Skip to content

Review RUFF ignore rules #1184

@niccokunzmann

Description

@niccokunzmann

We enforce formatting with RUFF since #1177.
However, we ignore a lot of formatting problems.
Please review the list below and checkmark those that should be removed.

  • "src/icalendar/tests/**" = [
    • "B011", # Do not assert False (python -O removes these calls), raise AssertionError()
    • "B018", # useless expression, used to test property access errors
    • "DTZ001", # datetime.datetime() called without a tzinfo argument
    • "E501", # line too long
    • "E721", # comparing types with ==
    • "E741", # ambiguous variable name
    • "FBT001", # Boolean positional argument in function definition
    • "FBT003", # Boolean positional value in function call
    • "INP001", # implicit namespace package
    • "N802", # Function name {name} should be lowercase
    • "N803", # Argument name {name} for {param_type} should be lowercase
    • "N806", # Variable should be lowercase
    • "N999", # module name
    • "PLC0415", # import outside top-level - common in tests for isolation
    • "PT011", # pytest.raises({exception}) is too broad
    • "PT012", # pytest.raises() block should contain a single simple statement
    • "PT015", # Assertion always fails, replace with pytest.fail()
    • "PT027", # assertRaises
    • "RUF001", # String contains ambiguous character
    • "SIM300", # Yoda condition
    • "SLF001", # Private member accessed
    • "T201", # print found
    • "T203", #pprint found
  • "src/icalendar/cal/**" = [
    • "A002", # argument shadowing builtin (sorted)
    • "DTZ001", # datetime() called without tzinfo
    • "E501", # line too long (docstrings with RFC references)
    • "FBT001", # boolean positional argument
    • "N802", # function name should be lowercase (TRIGGER_RELATED etc.)
    • "PERF203", # try-except in loop (parsing loop)
    • "PLC0415", # import outside top-level (circular import avoidance)
    • "PLW1641", # eq without hash (Component intentionally unhashable)
    • "PLW2901", # loop variable overwritten
    • "SLF001", # private member access
  • "src/icalendar/prop/**" = [
    • "DTZ001", # datetime() called without tzinfo
    • "DTZ007", # naive datetime from strptime
    • "E501", # line too long (docstrings with code examples)
    • "FBT003", # boolean positional value in function call
    • "N801", # Class name should use CamelCase
    • "PERF203", # try-except in loop
    • "PLC0415", # import outside top-level (circular import avoidance)
    • "PLW1641", # eq without hash (mutable structured types)
    • "PLW2901", # loop variable overwritten
  • "src/icalendar/fuzzing/*" = [
    • "T201", # print found
    • "N802", # Function name {name} should be lowercase
  • "docs/conf.py" = [
    • "INP001", # needs __init__.py
  • "src/icalendar/timezone/equivalent_timezone_ids_result.py" = [
    • "DTZ001", #datetime.datetime()called without atzinfo argument
    • "E501", # line too long
  • "src/icalendar/timezone/equivalent_timezone_ids.py" = [
    • "T201", # print
    • "T203", # pprint

Step 2 is to create an issue to remove those. This issue is about discussing which to remove and which to keep.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions