diff --git a/docs/conf.py b/docs/conf.py index ee31d4fb7..e4bae6144 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -64,7 +64,7 @@ def __getattr__(cls, name): # General information about the project. project = u'hera_cal' -copyright = u'2017, HERA Collaboration' +copyright = u'2017, HERA Collaboration' # noqa: A001 author = u'HERA Collaboration' # The version info for the project you're documenting, acts as replacement for diff --git a/hera_cal/chunker.py b/hera_cal/chunker.py index 802600222..7b06a49fb 100644 --- a/hera_cal/chunker.py +++ b/hera_cal/chunker.py @@ -12,7 +12,7 @@ from pyuvdata import utils as uvutils -def chunk_files(filenames, inputfile, outputfile, chunk_size, type="data", +def chunk_files(filenames, inputfile, outputfile, chunk_size, type="data", # noqa: A002 polarizations=None, spw_range=None, throw_away_flagged_ants=False, clobber=False, ant_flag_yaml=None, **read_kwargs): """Chunk a list of data or cal files together into a single file. diff --git a/hera_cal/utils.py b/hera_cal/utils.py index 4cb117dc2..836200ba2 100644 --- a/hera_cal/utils.py +++ b/hera_cal/utils.py @@ -375,7 +375,7 @@ def interp_peak(data, method='quinn', reject_edges=False): return indices, bin_shifts, peaks, new_peaks -def echo(message, type=0, verbose=True): +def echo(message, type=0, verbose=True): # noqa: A002 if verbose: if type == 0: print(message) diff --git a/pyproject.toml b/pyproject.toml index 98bfb7961..6f2cae199 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,38 @@ target-version = "py39" [tool.ruff.lint] select = [ "E", - "W" + "W", + "A", # builtins + # "ARG", # unused arguments + # "B", # bugbear + # "C4", # comprehensions + # "C90", # mccabe complexity + # "COM", # commas + # "D", # docstyle + # "DTZ", # datetime + # "F", # pyflakes + # "FA", # future annotations + # "FURB", # refurb + # "I", # isort + # "ISC", # implicit string concat + # "LOG", # logging + # "N", # pep8-naming + # "NPY", # numpy-specific rules + # "PERF", # performance + # "UP", # pyupgrade + # "PIE", # flake8-pie + # "PLC", # pylint + # "PLE", # pylint + # "PLR", # pylint + # "PLW", # pylint + # "PT", # pytest-style + # "PTH", # use pathlib + # "Q", # quotes + # "RSE", # flake8-raise + # "RUF", # ruff-specific rules + # "SIM", # flake8-simplify + # "TRY", # tryceratops + # "UP", # pyupgrade ] ignore = [ @@ -32,4 +63,21 @@ ignore = [ "E501", "W291", "W293", + # Following Rulesets we really don't want + "AIR", # airflow - unused library + "ASYNC", # async -- unused library + "DJ", # django -- unused library + "EXE", # executable -- unused features + "G", # logging-format -- this linter gives bad advice a lot + "INT", # gettext -- unknown why we would use this + "PD", # unused library + "PGH", # pygrep hooks? + "PYI", # typing stuff + "S", # flake8-bandit -- security stuff that isn't really applicable + "SLOT", # slots stuff that isn't applicable atm + "TCH", # type-checking + "TD", # todo's + "TID", # tidy imports (should be done with isort) + "TRIO", # trio unused package + "YTT", # py2to3 stuff ]