This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: gunicorn | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the gunicorn server | |
# Description: starts gunicorn using start-stop-daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from ansible.callbacks import display | |
from pprint import pformat | |
class FilterModule(object): | |
def filters(self): | |
return { | |
'shell_printer': self.shell_printer, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import partial | |
import pydantic | |
import logging | |
from django.contrib.postgres.fields import JSONField | |
from typing import Type, Union, Tuple | |
from django.core.serializers.json import DjangoJSONEncoder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from http import HTTPStatus | |
import pytest | |
def browser_client(request): | |
user_name = request.param | |
credentials = get_credentials_for_user(user_name) | |
client = Client() | |
client.login(**credentials) | |
client.user = user_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tool.flakehell.plugins] | |
pycodestyle = [ | |
"+*", | |
"-W503", # line break before binary operator | |
] | |
"flake8-docstrings" = ["-*"] | |
"flake8-*" = [ | |
"+*", | |
"-S311", # Using random for cryptographic purposes | |
"-S101", # Assert detected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from decimal import Decimal | |
import pydantic | |
@shared_task | |
def get_provider_api_stocks(api_key, url_constructor, deserialize_constructor): | |
# api_key в принципе нельзя передавать так | |
return True |