All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ae56983)
* Use setuptools.find_packages in setup
* Address mypy errors
# Copyright (C) 2020 Łukasz Langa
# Copyright (C) 2020 Łukasz Langa
-from setuptools import setup
+from setuptools import setup, find_packages
license="MIT",
py_modules=["_black_version"],
ext_modules=ext_modules,
license="MIT",
py_modules=["_black_version"],
ext_modules=ext_modules,
- packages=["blackd", "black", "blib2to3", "blib2to3.pgen2", "black_primer"],
+ packages=find_packages(where="src"),
package_dir={"": "src"},
package_data={
"blib2to3": ["*.txt"],
package_dir={"": "src"},
package_data={
"blib2to3": ["*.txt"],
from pathlib import Path
from shutil import rmtree, which
from tempfile import gettempdir
from pathlib import Path
from shutil import rmtree, which
from tempfile import gettempdir
-from typing import Any, Union
+from typing import Any, Union, Optional
- ctx: click.core.Context,
- param: Union[click.core.Option, click.core.Parameter],
+ ctx: Optional[click.core.Context],
+ param: Optional[Union[click.core.Option, click.core.Parameter]],
debug: Union[bool, int, str],
) -> Union[bool, int, str]:
"""Turn on debugging if asked otherwise INFO default"""
debug: Union[bool, int, str],
) -> Union[bool, int, str]:
"""Turn on debugging if asked otherwise INFO default"""
with patch("black_primer.lib.git_checkout_or_rebase", return_false):
with TemporaryDirectory() as td:
return_val = loop.run_until_complete(
with patch("black_primer.lib.git_checkout_or_rebase", return_false):
with TemporaryDirectory() as td:
return_val = loop.run_until_complete(
- lib.process_queue(str(config_path), td, 2)
+ lib.process_queue(str(config_path), Path(td), 2)
)
self.assertEqual(0, return_val)
)
self.assertEqual(0, return_val)
"no_diff": False,
}
with patch("black_primer.cli.lib.process_queue", return_zero):
"no_diff": False,
}
with patch("black_primer.cli.lib.process_queue", return_zero):
- return_val = loop.run_until_complete(cli.async_main(**args))
+ return_val = loop.run_until_complete(cli.async_main(**args)) # type: ignore
self.assertEqual(0, return_val)
def test_handle_debug(self) -> None:
self.assertEqual(0, return_val)
def test_handle_debug(self) -> None: