PKN)G iiblue_chip/__init__.py""" blue_chip ~~~~~~~~~ """ __version__ = "0.0.2" __all__ = ["__main__", "constants", "tasks", "config"] PKNM[dAAblue_chip/__main__.py""" blue_chip.__main__.py ~~~~~~~~~~~~~~~~~~~~~ """ from invoke import Collection, Program # pylint: disable=import-error from blue_chip import tasks from blue_chip import __version__ # pylint: disable=invalid-name program = Program( namespace=Collection.from_module(tasks), name="blue-chip", version=__version__ ) PKNa`Hblue_chip/constants.py""" blue_chip.contants.py ~~~~~~~~~~~~~~~~~~~~~ """ import pathlib BC_ROOT = pathlib.Path(__file__).parent BC_LINTRC_PATH = BC_ROOT / "lintrc" LINE_LENGTH = 88 PKNkkkblue_chip/config/__init__.py""" blue_chip.config.__init__.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~py """ from . import data __all__ = ["data"] PKNK|!blue_chip/config/data.py""" blue_chip.config.data.py ~~~~~~~~~~~~~~~~~~~~~~~~ """ from blue_chip.constants import LINE_LENGTH LINT_DATA = { "bc_root.yaml": f"""pylint: disable: # covered by pep8 - line-too-long - logging-fstring-interpolation # black conflict - bad-continuation pep8: options: max-line-length: {LINE_LENGTH} pep257: disable: - D400 # blank line required between summary line and description - D205 # Multi-line docstring summary should start at the first line - D212 """, "bc_audit.yaml": f"""strictness: veryhigh test-warnings: false doc-warnings: true inherits: - bc_root.yaml pylint: options: # max-args default = 5 max-args: 4 # max-locals default = 15 max-locals: 12 # max-branches default = 15 max-branches: 12 mccabe: options: max-complexity: 7 pyroma: run: True disable: - PYR18 """, "bc_default.yaml": f"""strictness: veryhigh test-warnings: false doc-warnings: true inherits: - bc_audit.yaml pylint: options: # max-args default = 5 max-args: 6 # max-locals default = 15 max-locals: 15 # max-branches default = 15 max-branches: 15 good-names: E,i,j,d,k,v,_ disable: - locally-disabled - fixme pyflakes: disable: # covered by pylint - F841 mccabe: options: max-complexity: 10 pep257: run: True """, "bc_tests.yaml": f"""inherits: - bc_default.yaml strictness: high test-warnings: true doc-warnings: false pyroma: run: False pep257: run: False """, } PKNE@@blue_chip/tasks/__init__.py# flake8: noqa from .linting import * from .formatting import * PKNc4PPblue_chip/tasks/formatting.py""" blue_chip.tasks.formatting.py ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from invoke import task from blue_chip import constants @task( help={ "line-length": "How many characters per line to allow. [default: {}]".format( constants.LINE_LENGTH ), "targets": "Paths/directories to format. [default: . ]", } ) def fmt(ctx, line_length=constants.LINE_LENGTH, targets="."): """Format python source code.""" if isinstance(targets, (list, tuple, set)): targets = " ".join(targets) ctx.run(f"black --line-length {line_length} {targets}") PKNb zblue_chip/tasks/linting.py""" blue_chip.tasks.linting ~~~~~~~~~~~~~~~~~~~~~~~ """ import pathlib from shutil import get_terminal_size from invoke import task from blue_chip import constants from blue_chip import config # pylint:disable=protected-access STAR_SEP = "*" * get_terminal_size().columns @task def cfg_lint(ctx): # pylint:disable=unused-argument """Configure prospector profiles.""" if constants.BC_LINTRC_PATH.exists(): return lintrc_path = pathlib.Path(constants.BC_LINTRC_PATH) lintrc_path.mkdir(exist_ok=False) for profile_name, profile_content in config.data.LINT_DATA.items(): profile_path = lintrc_path / profile_name print(f" Initializing {profile_name} ...") with open(profile_path, mode="w") as f_out: f_out.write(profile_content) print( "Lint configuration profiles created at:\n", f"\t{constants.BC_LINTRC_PATH}\n{STAR_SEP}", ) @task(pre=[cfg_lint]) def lint(ctx, targets="."): """Run static analysis on python source code.""" args = [ "prospector", "--profile-path", str(constants.BC_LINTRC_PATH), "--profile", "bc_default", ] ctx.run(f"{' '.join(args)} {targets}") PK!HJ+ 75*blue_chip-0.0.2.dist-info/entry_points.txtN+I/N.,()JJM)MO,ЋM̋*(O/J+*PKN#((!blue_chip-0.0.2.dist-info/LICENSEMIT License Copyright (c) 2019 Gabriel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. PK!HPOblue_chip-0.0.2.dist-info/WHEEL HM K-*ϳR03rOK-J,/RH,szd&Y)r$[)T&UrPK!H G "blue_chip-0.0.2.dist-info/METADATAU]o6}篸C6`*9K 5mYuF$h!(bJePIʎ)9vwk0Ay_Do]K;nrG_E_Z!Qp|%}Vʃڎ~*7>7R sn˴:X?#! U|:eZ%T⛓d%8={}9+.V1vs]Ar#HN[d訁bFngm_ޞ p^Ws񈸩jrw;-S5UAi\֭,[Z(Zđm9 {3~Mh#c7@;0eяŚQl$ Hl׆t)q%H9`C)ˀr #?Ce$K5e@˲{gvJ*X.~g x\ujzxۺR$ zb'u%UQ2٤<>Ә߯t\ kOw4 0oh%y '6b8LJYc ZJ }GCtT8/'/NSTXq6& pccoMz| )[l&0C$p)8&86ߗ`uU;ΘK8~W;<1PK!HRSߋi blue_chip-0.0.2.dist-info/RECORD}v@} bp3\Ep@*,<ĜW_q}9DIQvQTDѬ@;g/*Y"0|/?$8jS,#XJ[EZP n8kN` %- ¤ B9F2;º ۥV])+k~!4|XMubx\ҵ^iOBH7{ ˀhms]LAvqr)+g977lȺH5:by -/4nC l > =hkd-Ruށ5ҬX~eݖMJ=%̹'.7WĉQ1.}Gv5جtA