Skip to content

Commit d69d8ff

Browse files
committed
Add linting config
I misread the manual and you can't have an additional comment after the fmt: off so move it to a new line.
1 parent 6dd8ca2 commit d69d8ff

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

nuclearmasses/element_converter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ class ElementConverter:
99

1010
def __init__(self):
1111
"""Construct the symbol -> Z and Z -> symbol dictionaries."""
12-
# fmt: off # Fromatter wants to put each item on it's own line, I don't
12+
# fmt: off
13+
# Fromatter wants to put each item on it's own line, I don't
1314
self.z_to_symbol: dict[int, str] = {
1415
0: "n", 1: "H", 2: "He", 3: "Li", 4: "Be", 5: "B", 6: "C", 7: "N", 8: "O", 9: "F",
1516
10: "Ne", 11: "Na", 12: "Mg", 13: "Al", 14: "Si", 15: "P", 16: "S", 17: "Cl", 18: "Ar", 19: "K",
@@ -21,7 +22,7 @@ def __init__(self):
2122
70: "Yb", 71: "Lu", 72: "Hf", 73: "Ta", 74: "W", 75: "Re", 76: "Os", 77: "Ir", 78: "Pt", 79: "Au",
2223
80: "Hg", 81: "Tl", 82: "Pb", 83: "Bi", 84: "Po", 85: "At", 86: "Rn", 87: "Fr", 88: "Ra", 89: "Ac",
2324
90: "Th", 91: "Pa", 92: "U", 93: "Np", 94: "Pu", 95: "Am", 96: "Cm", 97: "Bk", 98: "Cf", 99: "Es",
24-
100: "Fm", 101: "Md", 102: "No", 103: "Lr", 104: "Rf", 105: "Db", 106: "Sg", 107: "Bh", 108: "Hs", 109: "Mt",
25+
100: "Fm", 101: "Md", 102: "No", 103: "Lr", 104: "Rf", 105: "Db", 106: "Sg", 107: "Bh", 108: "Hs", 109: "Mt", # noqa: E501
2526
110: "Ds", 111: "Rg", 112: "Cn", 113: "Ed", 114: "Fl", 115: "Ef", 116: "Lv", 117: "Ts", 118: "Og"
2627
}
2728
# fmt: on

nuclearmasses/mass_table.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import importlib.resources
2-
import logging
32
import pathlib
43

54
import pandas as pd

pyproject.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,19 @@ line-length = 120
8282
# Nothing different from defaults
8383

8484
[tool.ruff.lint.isort]
85+
known-first-party = ["nuclearmasses"]
8586
force-sort-within-sections = true
87+
88+
[tool.ruff.lint]
89+
extend-select = [
90+
"B", # flake8-bugbear
91+
"C4", # flake8-comprehensions
92+
"E", # pycodestyle errors
93+
"F", # pyflakes
94+
"W", # pycodestyle warnings
95+
"I", # isort
96+
"UP", # pyupgrade
97+
]
98+
99+
[tool.ruff.lint.per-file-ignores]
100+
"tests/*" = ["E501"]

0 commit comments

Comments
 (0)