Blacken'd
This commit is contained in:
parent
0ceebdaf68
commit
589d95b5ac
|
@ -8,8 +8,7 @@ import click
|
|||
@click.command()
|
||||
def main(args=None):
|
||||
"""Console script for bot_z."""
|
||||
click.echo("Replace this message by putting your code into "
|
||||
"bot_z.cli.main")
|
||||
click.echo("Replace this message by putting your code into " "bot_z.cli.main")
|
||||
click.echo("See click documentation at http://click.pocoo.org/")
|
||||
|
||||
|
||||
|
|
24
setup.py
24
setup.py
|
@ -21,11 +21,11 @@ import zipfile
|
|||
|
||||
|
||||
GECKO_RELEASE_PATH = "https://github.com/mozilla/geckodriver"
|
||||
PKG_NAME = 'bot_z'
|
||||
VERSION = '0.1.0'
|
||||
AUTHOR = 'blallo'
|
||||
AUTHOR_EMAIL = 'blallo@autistici.org'
|
||||
BIN_PATH = 'bin/geckodriver'
|
||||
PKG_NAME = "bot_z"
|
||||
VERSION = "0.1.0"
|
||||
AUTHOR = "blallo"
|
||||
AUTHOR_EMAIL = "blallo@autistici.org"
|
||||
BIN_PATH = "bin/geckodriver"
|
||||
|
||||
with open("README.md") as readme_file:
|
||||
readme = readme_file.read()
|
||||
|
@ -157,9 +157,9 @@ def preinstall(platform: T.Optional[str]=None) -> None:
|
|||
right place the geckodriver binary.
|
||||
"""
|
||||
# target_path = os.path.join(os.path.abspath(os.path.curdir), 'bot_z', 'bin')
|
||||
target_path = pkg_resources.resource_filename('bot_z', 'bin')
|
||||
target_path = pkg_resources.resource_filename("bot_z", "bin")
|
||||
ensure_local_folder()
|
||||
version = os.environ.get('BOTZ_GECKO_VERSION')
|
||||
version = os.environ.get("BOTZ_GECKO_VERSION")
|
||||
gecko_uri = assemble_driver_uri(version, platform)
|
||||
print("[POSTINSTALL] gecko_uri: {}".format(gecko_uri))
|
||||
download_driver_bin(gecko_uri, target_path)
|
||||
|
@ -203,7 +203,7 @@ class CustomInstallCommand(install):
|
|||
def run(self):
|
||||
opts = self.distribution.get_cmdline_options()
|
||||
platform = None
|
||||
if 'bdist_wheel' in opts:
|
||||
if "bdist_wheel" in opts:
|
||||
platform = translate_platform_to_gecko_vers(
|
||||
opts["bdist_wheel"].get("plat-name")
|
||||
)
|
||||
|
@ -242,12 +242,8 @@ setup(
|
|||
"install": CustomInstallCommand,
|
||||
"bdist_wheel": CustomBDistWheel,
|
||||
},
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'bot_z=bot_z.cli:main'
|
||||
]
|
||||
},
|
||||
package_data = {'bot_z': ['bin/geckodriver']},
|
||||
entry_points={"console_scripts": ["bot_z=bot_z.cli:main"]},
|
||||
package_data={"bot_z": ["bin/geckodriver"]},
|
||||
include_package_data=True,
|
||||
install_requires=requirements,
|
||||
license="GLWTS Public Licence",
|
||||
|
|
|
@ -28,7 +28,7 @@ class TestBot_z(unittest.TestCase):
|
|||
runner = CliRunner()
|
||||
result = runner.invoke(cli.main)
|
||||
assert result.exit_code == 0
|
||||
assert 'bot_z.cli.main' in result.output
|
||||
help_result = runner.invoke(cli.main, ['--help'])
|
||||
assert "bot_z.cli.main" in result.output
|
||||
help_result = runner.invoke(cli.main, ["--help"])
|
||||
assert help_result.exit_code == 0
|
||||
assert '--help Show this message and exit.' in help_result.output
|
||||
assert "--help Show this message and exit." in help_result.output
|
||||
|
|
Loading…
Reference in New Issue
Block a user