scientific-python / repo-review

Framework that can run checks on repos
https://repo-review.readthedocs.io
BSD 3-Clause "New" or "Revised" License
62 stars 3 forks source link

false positive for RF101, RF102, RF103 #226

Closed cgahr closed 2 months ago

cgahr commented 2 months ago

When I run repo-review locally on my python project, I get the following error:

Ruff:
├── RF001 Has Ruff config ✅
├── RF002 Target version must be set ✅
├── RF003 src directory specified if used ✅
├── RF101 Bugbear must be selected ❌
│   Must select the flake8-bugbear B checks. Recommended:                                                
│   
│                                                                                                        
│    [tool.ruff.lint]                                                                                    
│    extend-select = [                                                                                   
│      "B",  # flake8-bugbear                                                                            
│    ]                                                                                                   
│                                                                                                        
├── RF102 isort must be selected ❌
│   Must select the isort I checks. Recommended:                                                         
│   
│                                                                                                        
│    [tool.ruff.lint]                                                                                    
│    extend-select = [                                                                                   
│      "I",  # isort                                                                                     
│    ]                                                                                                   
│                                                                                                        
├── RF103 pyupgrade must be selected ❌
│   Must select the pyupgrade UP checks. Recommended:                                                    
│   
│                                                                                                        
│    [tool.ruff.lint]                                                                                    
│    extend-select = [                                                                                   
│      "UP",  # pyupgrade                                                                                
│    ]                                                                                                   
│                                                                                                        

IMO, this is a false positive, since I have

[tool.lint.ruff]
select = [
    "B",
    "I",
    "UP"
    # ...
]
# ...

in my pyproject.toml.

cgahr commented 2 months ago

I just realized that there was a bug in my config and everything works correctly!