Skip to content

Commit 8fbc26e

Browse files
committed
cleanup
1 parent 5ae4330 commit 8fbc26e

6 files changed

Lines changed: 25 additions & 30 deletions

File tree

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@
311311

312312

313313
# Example configuration for intersphinx: refer to the Python standard library.
314-
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
314+
intersphinx_mapping = {"python": ("https://docs.python.org/3", None)}
315315

316316

317317
def setup(app):
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Example config used by load_config_app.py
22

33
c = get_config() # noqa
4-
c.MyClass.name = 'Harvard'
4+
c.MyClass.name = "Harvard"
55
c.MyClass.ranking = 100

examples/docs/configs/main_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
c = get_config() # noqa
44

55
# Load everything from base_config.py
6-
load_subconfig('base_config.py') # noqa
6+
load_subconfig("base_config.py") # noqa
77

88
# Now override one of the values
9-
c.School.name = 'Caltech'
9+
c.School.name = "Caltech"

pyproject.toml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,17 @@ features = ["test"]
7575
test = "mypy --install-types --non-interactive {args}"
7676

7777
[tool.hatch.envs.lint]
78-
dependencies = ["black==23.3.0", "mdformat>0.7", "ruff==0.1.1"]
78+
dependencies = ["mdformat>0.7", "ruff==0.1.3"]
7979
detached = true
8080
[tool.hatch.envs.lint.scripts]
8181
style = [
8282
"ruff {args:.}",
83-
"black --check --diff {args:.}",
83+
"ruff format {args:.}",
8484
"mdformat --check {args:docs *.md}"
8585
]
8686
fmt = [
87-
"black {args:.}",
8887
"ruff --fix {args:.}",
88+
"ruff format {args:.}",
8989
"mdformat {args:docs *.md}"
9090
]
9191

@@ -157,13 +157,8 @@ exclude_lines = [
157157
relative_files = true
158158
source = ["traitlets"]
159159

160-
[tool.black]
161-
line-length = 100
162-
skip-string-normalization = true
163-
target-version = ["py37"]
164-
165160
[tool.ruff]
166-
target-version = "py37"
161+
target-version = "py38"
167162
line-length = 100
168163

169164
[tool.ruff.lint]

tests/config/test_application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def test_basic(self):
130130
self.assertEqual(app.config_file, "")
131131

132132
def test_app_name_set_via_constructor(self):
133-
app = MyApp(name='set_via_constructor')
133+
app = MyApp(name="set_via_constructor")
134134
assert app.name == "set_via_constructor"
135135

136136
def test_mro_discovery(self):

tests/config/test_argcomplete.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -133,21 +133,21 @@ def run_completer(
133133
def test_complete_simple_app(self, argcomplete_on):
134134
app = ArgcompleteApp()
135135
expected = [
136-
'--help',
137-
'--debug',
138-
'--show-config',
139-
'--show-config-json',
140-
'--log-level',
141-
'--Application.',
142-
'--ArgcompleteApp.',
136+
"--help",
137+
"--debug",
138+
"--show-config",
139+
"--show-config-json",
140+
"--log-level",
141+
"--Application.",
142+
"--ArgcompleteApp.",
143143
]
144144
assert set(self.run_completer(app, "app --")) == set(expected)
145145

146146
# completing class traits
147147
assert set(self.run_completer(app, "app --App")) > {
148-
'--Application.show_config',
149-
'--Application.log_level',
150-
'--Application.log_format',
148+
"--Application.show_config",
149+
"--Application.log_level",
150+
"--Application.log_format",
151151
}
152152

153153
def test_complete_custom_completers(self, argcomplete_on):
@@ -195,9 +195,9 @@ def test_complete_subcommands_subapp1(self, argcomplete_on):
195195
app = MainApp()
196196
try:
197197
assert set(self.run_completer(app, "app subapp1 --Sub")) > {
198-
'--SubApp1.show_config',
199-
'--SubApp1.log_level',
200-
'--SubApp1.log_format',
198+
"--SubApp1.show_config",
199+
"--SubApp1.log_level",
200+
"--SubApp1.log_format",
201201
}
202202
finally:
203203
SubApp1.clear_instance()
@@ -206,14 +206,14 @@ def test_complete_subcommands_subapp2(self, argcomplete_on):
206206
app = MainApp()
207207
try:
208208
assert set(self.run_completer(app, "app subapp2 --")) > {
209-
'--Application.',
210-
'--SubApp2.',
209+
"--Application.",
210+
"--SubApp2.",
211211
}
212212
finally:
213213
SubApp2.clear_instance()
214214

215215
def test_complete_subcommands_main(self, argcomplete_on):
216216
app = MainApp()
217217
completions = set(self.run_completer(app, "app --"))
218-
assert completions > {'--Application.', '--MainApp.'}
218+
assert completions > {"--Application.", "--MainApp."}
219219
assert "--SubApp1." not in completions and "--SubApp2." not in completions

0 commit comments

Comments
 (0)