for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
#!/usr/bin/env python
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
class SomeClass: def some_method(self): """Do x and return foo."""
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.
import os
import logging
from pathlib import Path
import click
click
This can be caused by one of the following:
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
# .scrutinizer.yml before_commands: - sudo pip install abc # Python2 - sudo pip3 install abc # Python3
This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.
__init__.py
from . import VERSION
from .models import Project, Config, Data
log = logging.getLogger(__name__)
log
(([A-Z_][A-Z0-9_]*)|(__.*__))$
This check looks for invalid names for a range of different identifiers.
You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.
If your project includes a Pylint configuration file, the settings contained in that file take precedence.
To find out more about Pylint, please refer to their site.
@click.group(context_settings=dict(help_option_names=['-h', '--help']))
@click.version_option(message=VERSION)
def main():
logging.basicConfig(level=logging.INFO)
logging.getLogger('yorm').setLevel(logging.WARNING)
@main.command()
@click.option('-r', '--root', type=Path, default=Path.cwd)
def new(root):
_enter(root)
if Project.generate():
Config.generate_example()
Data.generate_example()
def _enter(path):
"""Create and enter the root directory."""
path.mkdir(parents=True, exist_ok=True)
os.chdir(str(path))
if __name__ == '__main__':
main()
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.