summaryrefslogtreecommitdiffstats
path: root/pyproject.toml
blob: ce4203729f4fd939329cc03853e2327347a811d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
[tool.ruff]
target-version = "py37"
lint.select = [
    "E",  # pycodestyle errors
    "W",  # pycodestyle warnings
    "F",  # pyflakes
    "C",  # flake8-comprehensions
    "T",  # Print.
    "I",  # isort
    # "B",  # flake8-bugbear
    "UP",  # pyupgrade
    "RUF100",  # unused-noqa
    "Q", # quotes
]
lint.ignore = [
    "E501",  # Line too long, handled by black
    "C901",  # Too complex
    "E722",  # bare except.
]


[tool.ruff.lint.per-file-ignores]
"examples/*" = ["T201"]  # Print allowed in examples.
"examples/ptpython_config/config.py" = ["F401"]  # Unused imports in config.
"ptpython/entry_points/run_ptipython.py" = ["T201", "F401"] # Print, import usage.
"ptpython/entry_points/run_ptpython.py" = ["T201"]  # Print usage.
"ptpython/ipython.py" = ["T100"]  # Import usage.
"ptpython/repl.py" = ["T201"]  # Print usage.
"ptpython/printer.py" = ["T201"]  # Print usage.
"tests/run_tests.py" = ["F401"]  # Unused imports.


[tool.ruff.lint.isort]
known-first-party = ["ptpython"]
known-third-party = ["prompt_toolkit", "pygments", "asyncssh"]