diff --git a/code.deb b/code.deb new file mode 100644 index 0000000..ca0383e Binary files /dev/null and b/code.deb differ diff --git a/level_1/a_user_instance.py b/level_1/a_user_instance.py index e5d0368..c34317e 100644 --- a/level_1/a_user_instance.py +++ b/level_1/a_user_instance.py @@ -14,5 +14,5 @@ def __init__(self, name: str, username: str, age: int, phone: str): if __name__ == '__main__': - pass # код писать тут - + user = User('Alexandr', 'Beloded', 35, '8927111111') + print (f"Информация о пользователе: имя: {user.name}, юзернэйм: {user.username}, возраст: {user.age}, телефон: {user.phone}") \ No newline at end of file diff --git a/level_1/b_student_full_name_method.py b/level_1/b_student_full_name_method.py index 14ec439..18b925d 100644 --- a/level_1/b_student_full_name_method.py +++ b/level_1/b_student_full_name_method.py @@ -18,5 +18,6 @@ def get_full_name(self): if __name__ == '__main__': - pass # код писать тут - + student = Student('OLeg', 'Ivanov', 'IT', 3) + full_name = student.get_full_name() + print(full_name) \ No newline at end of file diff --git a/level_1/c_product_class.py b/level_1/c_product_class.py index 3952b66..916e6a1 100644 --- a/level_1/c_product_class.py +++ b/level_1/c_product_class.py @@ -9,8 +9,18 @@ class Product: - pass # код писать тут + def __init__(self, name: str, description: str, price: int, weight: int): + self.name = name + self.description = description + self.price = price + self.weight = weight + + def info_about_product(self): + return f'Data about product: {self.name}, {self.description}, {self.price}, {self.weight}' if __name__ == '__main__': - pass # код писать тут + phone = Product('IPhone', '15 Pro', 1100, 195) + info = phone.info_about_product() + print(info) + \ No newline at end of file diff --git a/level_1/d_bank_account_increase_balance.py b/level_1/d_bank_account_increase_balance.py index 0ea36f2..9fa05af 100644 --- a/level_1/d_bank_account_increase_balance.py +++ b/level_1/d_bank_account_increase_balance.py @@ -15,8 +15,16 @@ def __init__(self, owner_full_name: str, balance: float): self.balance = balance def increase_balance(self, income: float): - pass # код писать тут + self.balance += income + return self.balance + + def info_bank_account(self): + return f'{self.owner_full_name}, {self.balance} ' if __name__ == '__main__': - pass # код писать тут + user_acc = BankAccount('Oleg Ivanov', 500.0) + info = user_acc.info_bank_account() + print(info) + user_acc.increase_balance(1000.0) + print(f"Баланс счета после пополнения: {user_acc.balance}") diff --git a/level_1/e_bank_account_decrease_balance.py b/level_1/e_bank_account_decrease_balance.py index dfd4586..1a11f34 100644 --- a/level_1/e_bank_account_decrease_balance.py +++ b/level_1/e_bank_account_decrease_balance.py @@ -10,8 +10,30 @@ class BankAccount: - pass # код писать тут + def __init__(self, owner_full_name: str, balance: float): + self.owner_full_name = owner_full_name + self.balance = balance + + def increase_balance(self, income: float): + self.balance += income + return self.balance + + def decrease_balance(self, outcome: float): + if self.balance - outcome < 0: + raise ValueError("You can't receive more than you have") + self.balance -= outcome + return self.balance + + def info_bank_account(self): + return f'{self.owner_full_name}, {self.balance} ' if __name__ == '__main__': - pass # код писать тут + user_acc = BankAccount('Oleg Ivanov', 1000.5) + print(f"Баланс счета до снятия: {user_acc.balance}") + user_acc.decrease_balance(500.5) + print(f"Баланс счета после снятия 500: {user_acc.balance}") + try: + user_acc.decrease_balance(100000) + except ValueError as e: + print(e) diff --git a/level_2/a_user_from_functions_to_class.py b/level_2/a_user_from_functions_to_class.py index 18a64ce..7306f43 100644 --- a/level_2/a_user_from_functions_to_class.py +++ b/level_2/a_user_from_functions_to_class.py @@ -15,4 +15,13 @@ def generate_short_user_description(username: str, user_id: int, name: str): class User: - pass # код писать тут + def __init__(self, username: str, user_id: int, name: str) -> None: + self.username = username + self.user_id = user_id + self.name = name + + def make_username_capitalized(self) -> str: + return self.username.capitalize() + + def generate_short_user_description(self) -> str: + return f'User with id {self.user_id} has {self.username} username and {self.name} name' diff --git a/level_2/b_user_should_be_banned.py b/level_2/b_user_should_be_banned.py index 3ec9359..f686eda 100644 --- a/level_2/b_user_should_be_banned.py +++ b/level_2/b_user_should_be_banned.py @@ -11,4 +11,12 @@ class User: - pass # код писать тут + def __init__(self, name: str, surname: str, age: int) -> None: + self.name = name + self.surname = surname + self.age = age + + def should_be_banned(self): + if self.surname in SURNAMES_TO_BAN: + return f"{self.surname} is banned" + return f"{self.surname} is not banned" diff --git a/level_3/a_credit_bank_account.py b/level_3/a_credit_bank_account.py index b73657a..335806a 100644 --- a/level_3/a_credit_bank_account.py +++ b/level_3/a_credit_bank_account.py @@ -8,24 +8,45 @@ 4. Создать экземпляр класс CreditAccount и вызвать у него каждый из возможных методов. """ -# код писать тут - -class CreditAccount: - def __init__(self, owner_full_name: str, balance: float): +class BankAccount: + def __init__(self, owner_full_name: str, balance: float) -> None: self.owner_full_name = owner_full_name self.balance = balance - def increase_balance(self, amount: float): + +class CreditAccount(BankAccount): + def increase_balance(self, amount: float) -> float: self.balance += amount - def decrease_balance(self, amount: float): + def decrease_balance(self, amount: float) -> float: self.balance -= amount - def is_eligible_for_credit(self): + def is_eligible_for_credit(self) -> bool: return self.balance > 1000 +# class CreditAccount: +# def __init__(self, owner_full_name: str, balance: float): +# self.owner_full_name = owner_full_name +# self.balance = balance +# def increase_balance(self, amount: float): +# self.balance += amount -if __name__ == '__main__': - pass # код писать тут +# def decrease_balance(self, amount: float): +# self.balance -= amount +# def is_eligible_for_credit(self): +# return self.balance > 1000 + + +if __name__ == '__main__': + owner_1 = BankAccount('ALexandr Ivanov', 1500.00) + print(owner_1.owner_full_name) + print(owner_1.balance) + owner_2 = CreditAccount('Oleg Olegov', 1000.00) + print(owner_2.owner_full_name) + print(owner_2.balance) + owner_2.increase_balance(300.00) + print(owner_2.balance) + owner_2.decrease_balance(100.00) + print(owner_2.is_eligible_for_credit()) diff --git a/level_3/b_user_manage.py b/level_3/b_user_manage.py index 6417c77..6c3d857 100644 --- a/level_3/b_user_manage.py +++ b/level_3/b_user_manage.py @@ -22,9 +22,52 @@ def get_users(self): return self.usernames -# код писать тут +class AdminManager(UserManager): + def ban_username(self, username: str) -> bool: + if username in self.usernames: + self.usernames.remove(username) + return True + else: + print(f"Такого пользователя не существует.") + return False + + +class SuperAdminManager(AdminManager): + def ban_all_users(self) -> None: # функция не работает. + self.usernames = [] if __name__ == '__main__': - pass # код писать тут + user_manager = UserManager() + + # Добавляем пользователей + user_manager.add_user("Ivan") + user_manager.add_user("Aleksey") + user_manager.add_user("Oleg") + + # Выводим список пользователей + print("Список пользователей (UserManager):", user_manager.get_users()) + + # Создаем экземпляр класса AdminManager + admin_manager = AdminManager() + + # Наследуем список пользователей от UserManager + admin_manager.usernames = user_manager.usernames # Механизм наследования!!! + + # Забанить пользователя + admin_manager.ban_username("Aleksey") + + # Выводим обновленный список пользователей + print("Список пользователей (AdminManager):", admin_manager.get_users()) + + # Создаем экземпляр класса SuperAdminManager + super_admin_manager = SuperAdminManager() + + # Наследуем список пользователей от AdminManager + super_admin_manager.usernames = admin_manager.usernames # Механизм наследования!!! + + # Забанить всех пользователей + super_admin_manager.ban_all_users() + # Выводим обновленный список пользователей + print("Список пользователей (SuperAdminManager):", super_admin_manager.get_users()) \ No newline at end of file diff --git a/level_3/c_text_processor.py b/level_3/c_text_processor.py index d9aed49..a8d15c1 100644 --- a/level_3/c_text_processor.py +++ b/level_3/c_text_processor.py @@ -20,8 +20,18 @@ def summarize(self): return f'Total text length: {len(self.text)}' -# код писать тут +class AdvancedTextProcessor(TextProcessor): + def summarize(self): + return f'Total text length: {len(self.text)}, total number of words in the text: {sum(1 for x in self.text.split())}' if __name__ == '__main__': - pass # код писать тут + text_1 = TextProcessor('Today is a difficult day for all of us') + print(text_1.text) + print(text_1.to_upper()) + print(text_1.summarize()) + text_2 = AdvancedTextProcessor('Tomorrow will be much more difficult than today') + print(text_2.text) + print(text_2.to_upper()) + print(text_2.summarize()) + print(text_1.summarize()) diff --git a/level_3/d_alcohol_product.py b/level_3/d_alcohol_product.py index 49065b1..645f667 100644 --- a/level_3/d_alcohol_product.py +++ b/level_3/d_alcohol_product.py @@ -26,8 +26,13 @@ def is_available(self): class AlcoholProduct(Product): - pass # код писать тут + def is_available(self): + return super().is_available() and 23 > datetime.now().hour > 5 if __name__ == '__main__': - pass # код писать тут + cool_beer = AlcoholProduct('Zchigulevskoe', 72, 100) + print(cool_beer.price) + print(cool_beer.title) + print(cool_beer.stock_quantity) + print(cool_beer.is_available()) diff --git a/level_4/a_file_handler.py b/level_4/a_file_handler.py index c05ce7d..a96bf6a 100644 --- a/level_4/a_file_handler.py +++ b/level_4/a_file_handler.py @@ -14,24 +14,36 @@ """ import csv import json +from typing import Any class FileHandler: - def __init__(self, filename): + def __init__(self, filename: str) -> None: self.filename = filename - def read(self): + def read(self) -> str | list[dict[str | Any, str | Any]]: with open(self.filename, 'r') as file: return file.read() class JSONHandler(FileHandler): - pass # код писать тут + def read(self) -> str: + with open(self.filename, 'r') as json_file: + return json.load(json_file) class CSVHandler(FileHandler): - pass # код писать тут + def read(self) -> list[dict[str | Any, str | Any]]: + with open(self.filename, 'r') as csv_file: + csv_reader = csv.DictReader(csv_file, delimiter=',') + return [row for row in csv_reader] if __name__ == '__main__': - pass # код писать тут + + file_reader = FileHandler('data/text.txt') + print(file_reader.read()) + json_reader = JSONHandler('data/recipes.json') + print(json_reader.read()) + csv_reader = CSVHandler('data/user_info.csv') + print(csv_reader.read()) diff --git a/level_4/b_food_product.py b/level_4/b_food_product.py index 993325a..e429a94 100644 --- a/level_4/b_food_product.py +++ b/level_4/b_food_product.py @@ -14,20 +14,38 @@ class Product: - def __init__(self, title, quantity): + def __init__(self, title: str, quantity: int) -> None: self.title = title self.quantity = quantity - def get_full_info(self): + def get_full_info(self) -> str: return f'Product {self.title}, {self.quantity} in stock.' - def is_available(self): + def is_available(self) -> bool: return self.quantity > 0 class FoodProduct(Product): - pass # код писать тут + def __init__(self, title: str, quantity: int, expiration_date: str) -> None: + super().__init__(title, quantity) + self.expiration_date = expiration_date + + def is_available(self) -> bool: + expiration_date_datetime = datetime.strptime(self.expiration_date, '%d-%m-%Y') + return super().is_available() and expiration_date_datetime > datetime.now() + + def get_full_info(self) -> str: + return f'Product {self.title}, {self.quantity} in stock with {self.expiration_date} experation date.' if __name__ == '__main__': - pass # код писать тут + product = Product('Milk', 10) + print(product.get_full_info()) + print(product.is_available()) + drink_product = FoodProduct('Vodka', 100, '22-12-2023') + print(drink_product.get_full_info()) + print(drink_product.is_available()) + drink_product_1 = FoodProduct('Not vodka', 100, '01-12-2023') + print(drink_product_1.get_full_info()) + print(drink_product_1.is_available()) + diff --git a/level_5/a_premium_food.py b/level_5/a_premium_food.py index 4745369..192db9e 100644 --- a/level_5/a_premium_food.py +++ b/level_5/a_premium_food.py @@ -16,15 +16,30 @@ def __init__(self, title: str, price: float): self.title = title self.price = price - def get_product_info(self): + def get_product_info(self) -> str: return f'Product title: {self.title}, price: {self.price}' class FoodProductMixin: - def is_premium_food(self): + def is_premium_food(self) -> bool: return self.price > 10 +class FoodProduct(FoodProductMixin, Product): + def __init__(self, title: str, price: float): + super().__init__(title, price) + + def get_product_info(self) -> str: + return super().get_product_info() + (' (Premium)') if self.is_premium_food() else super().get_product_info() + + if __name__ == '__main__': - pass # код писать тут + food_product_1 = FoodProduct('Bread', 9.0) + print(food_product_1.get_product_info()) + + food_product_2 = FoodProduct('Super_Bread', 99.99) + print(food_product_2.get_product_info()) + + + diff --git a/level_5/b_change_admin_email.py b/level_5/b_change_admin_email.py index 9ead126..6376cae 100644 --- a/level_5/b_change_admin_email.py +++ b/level_5/b_change_admin_email.py @@ -13,17 +13,17 @@ def __init__(self, username: str, email: str): self.username = username self.email = email - def change_email(self, new_email): + def change_email(self, new_email: str) -> None: self.email = new_email class AdminUserMixin: - def change_email(self, new_email): + def change_email(self, new_email: str) -> SystemError: raise SystemError('It is impossible to change the email address of the administrator') -class AdminUser(User, AdminUserMixin): - def change_user_info(self, user: User, new_username: str, new_email: str): +class AdminUser(AdminUserMixin, User): + def change_user_info(self, user: User, new_username: str, new_email: str) -> None: user.username = new_username user.email = new_email diff --git a/level_5/c_authorization_form_mixin.py b/level_5/c_authorization_form_mixin.py index b0292c3..8131a7e 100644 --- a/level_5/c_authorization_form_mixin.py +++ b/level_5/c_authorization_form_mixin.py @@ -17,17 +17,26 @@ def __init__(self, username: str, password: str): self.username = username self.password = password - def valid_form(self): + def valid_form(self) -> bool: return len(self.password) > 8 -class AuthorizationFormMixin: - def valid_form(self): - pass # писать код тут +class AuthorizationFormMixin(Form): + def valid_form(self) -> bool: + return True if super().valid_form() and self.username in USERNAMES_IN_DB else False -# писать код тут +class AuthorizationForm(AuthorizationFormMixin, Form): + def __init__(self, username: str, password: str): + super().__init__(username, password) if __name__ == '__main__': - pass # писать код тут + authorization_check_1 = AuthorizationForm('Aleksey Ivanov', '111111111') + authorization_check_2 = AuthorizationForm('Alice_2023', '222222222') + authorization_check_3 = AuthorizationForm('Alice_2023', '22') + print(authorization_check_1.valid_form()) + print(authorization_check_2.valid_form()) + print(authorization_check_3.valid_form()) + + diff --git a/level_5/d_response_headers.py b/level_5/d_response_headers.py index c9413b5..275d7cf 100644 --- a/level_5/d_response_headers.py +++ b/level_5/d_response_headers.py @@ -16,12 +16,12 @@ class BaseResponse: def __init__(self, content: str): self.content = content - def get_byte_content_length(self): + def get_byte_content_length(self) -> int: return len(self.content.encode('utf-8')) class BaseHeadersMixin: - def generate_base_headers(self): + def generate_base_headers(self) -> dict: return { 'Content-Type': 'application/x-www-form-urlencoded', 'user-agent': ( @@ -30,11 +30,20 @@ def generate_base_headers(self): ), } - def generate_headers(self): + def generate_headers(self) -> dict: return self.generate_base_headers() -# код писать тут +class CustomResponse(BaseHeadersMixin, BaseResponse): + def __init__(self, content: str): + super().__init__(content) + + def generate_headers(self) -> dict: + headers = super().generate_headers() + headers['Content-Length'] = self.get_byte_content_length() + return headers + if __name__ == '__main__': - pass # код писать тут + cusom_response_check = CustomResponse('Check headers for me') + print(cusom_response_check.generate_headers()) diff --git a/level_6/a_log_products.py b/level_6/a_log_products.py index d11925d..233f1a2 100644 --- a/level_6/a_log_products.py +++ b/level_6/a_log_products.py @@ -15,28 +15,42 @@ def __init__(self, title: str, price: float): self.title = title self.price = price - def get_info(self): + def get_info(self) -> str: return f'Product {self.title} with price {self.price}' -class PremiumProduct(Product): - def increase_price(self): +class PrintLoggerMixin: + def log(self, message: str) -> None: + print(message) + + +class PremiumProduct(PrintLoggerMixin, Product): + def increase_price(self) -> None: self.price *= 1.2 + self.log(f'Increased price for PremiumProduct: {self.price}') - def get_info(self): + def get_info(self) -> str: base_info = super().get_info() + self.log(f'Getting info for PremiumProduct: {base_info}') return f'{base_info} (Premium)' -class DiscountedProduct(Product): - def decrease_price(self): +class DiscountedProduct(PrintLoggerMixin, Product): + def decrease_price(self) -> None: self.price /= 1.2 + self.log(f'Decrease price for DiscountedProduct: {self.price}') - def get_info(self): + def get_info(self) -> str: base_info = super().get_info() + self.log(f'Getting info for DiscountedProduct: {base_info}') return f'{base_info} (Discounted)' if __name__ == '__main__': - pass + premium_product = PremiumProduct(title='Whiskey', price=5000.0) + premium_product.increase_price() + premium_product.get_info() + discount_product = DiscountedProduct(title='Vodka', price=450.0) + discount_product.decrease_price() + discount_product.get_info() diff --git a/level_6/b_developer.py b/level_6/b_developer.py index dbe12c8..133f3e9 100644 --- a/level_6/b_developer.py +++ b/level_6/b_developer.py @@ -15,7 +15,7 @@ def __init__(self, name: str, surname: str, age: int, salary: float): self.age = age self.salary = salary - def get_info(self): + def get_info(self) -> str: return f'{self.name} with salary {self.salary}' @@ -26,18 +26,29 @@ def __init__(self, name: str, surname: str, age: int, salary: float): class AdminMixin: - def increase_salary(self, employee: Employee, amount: float): + def increase_salary(self, employee: Employee, amount: float) -> None: employee.salary += amount class SuperAdminMixin(AdminMixin): - def decrease_salary(self, employee: Employee, amount: float): + def decrease_salary(self, employee: Employee, amount: float) -> None: employee.salary -= amount -# код писать тут +class Developer(SuperAdminMixin, ItDepartmentEmployee): + def __init__(self, name: str, surname: str, age: int, salary: float, language: str): + super().__init__(name, surname, age, salary) + self.language = language + + def get_info(self) -> str: + return super().get_info() + (f' with {self.language} language') if __name__ == '__main__': - pass # код писать тут + developer = Developer(name='OLeg', surname='Ivanov', age=30, salary=100000, language='Python') + print(developer.get_info()) + developer.increase_salary(employee=developer, amount=5000.0) + print(developer.get_info()) + developer.decrease_salary(employee=developer, amount=10000) + print(developer.get_info()) diff --git a/level_7/a_ebay_title.py b/level_7/a_ebay_title.py index 3b2c42c..f047197 100644 --- a/level_7/a_ebay_title.py +++ b/level_7/a_ebay_title.py @@ -7,17 +7,20 @@ то что вы ожидаете. """ -EBAY_TITLE = 'eBay' +# EBAY_TITLE = 'eBay' class EbayProduct: + ebay_title = 'eBay' + def __init__(self, title: str, price: float): self.title = title self.price = price - def get_product_info(self): - return f'Product {self.title} with price {self.price} from {EBAY_TITLE} marketplace' + def get_product_info(self) -> str: + return f'Product {self.title} with price {self.price} from {self.ebay_title} marketplace' if __name__ == '__main__': - pass + ebay_product = EbayProduct(title='Book', price=100) + print(ebay_product.get_product_info()) diff --git a/level_7/b_bank_account.py b/level_7/b_bank_account.py index cb415e7..39daef7 100644 --- a/level_7/b_bank_account.py +++ b/level_7/b_bank_account.py @@ -16,9 +16,22 @@ def __init__(self, owner: str, balance: float): self.owner = owner self.balance = balance - def decrease_balance(self, amount: float): - pass # писать код тут + def decrease_balance(self, amount: float) -> None: + self.amount = amount + if self.balance - self.amount >= self.min_balance: + self.balance = self.balance - self.amount + else: + raise ValueError("You are fuckin looser. You don't have enough money. Please fund your wallet") if __name__ == '__main__': - pass # писать код тут + bank_accaunt = BankAccount(owner='Oleg', balance=1000) + bank_accaunt.decrease_balance(200) + print(bank_accaunt.balance) + bank_accaunt.decrease_balance(899) + print(bank_accaunt.balance) + bank_accaunt.decrease_balance(2) + print(bank_accaunt.balance) + + + diff --git a/level_7/c_photo_limit.py b/level_7/c_photo_limit.py index 60ee17e..594af86 100644 --- a/level_7/c_photo_limit.py +++ b/level_7/c_photo_limit.py @@ -16,14 +16,14 @@ class PhotoForm: def __init__(self, photo_urls: list[str]): self.photo_urls = photo_urls - def validate_photos(self): + def validate_photos(self) -> None: if len(self.photo_urls) > self.max_photos_number: raise ValueError -def generate_photos_limit_message(): - return # код писать тут +def generate_photos_limit_message() -> str: + return f'Вы можете загрузить не более {PhotoForm.max_photos_number} фотографий' if __name__ == '__main__': - pass # код писать тут + print(generate_photos_limit_message()) diff --git a/level_7/d_google_logs.py b/level_7/d_google_logs.py index c281d29..9162824 100644 --- a/level_7/d_google_logs.py +++ b/level_7/d_google_logs.py @@ -18,16 +18,18 @@ def __init__(self, data: dict, message: str): self.data = data self.message = message - def is_log_size_valid(self): + def is_log_size_valid(self) -> bool: return self.get_data_size() <= self.max_log_size - def get_data_size(self): + def get_data_size(self) -> int: serialized_data = json.dumps(self.data) return len(serialized_data.encode('utf-8')) class GoogleLogger(Logger): - def is_valid(self): + max_log_size = 10 + + def is_valid(self) -> bool: return self.is_log_size_valid() and bool(self.message) diff --git a/level_7/e_user_str_repr.py b/level_7/e_user_str_repr.py index fd0a634..aac375d 100644 --- a/level_7/e_user_str_repr.py +++ b/level_7/e_user_str_repr.py @@ -13,6 +13,12 @@ def __init__(self, user_id: int, email: str, is_admin: bool): self.email = email self.is_admin = is_admin + def __str__(self) -> str: + return f'User ID: {self.user_id}, User email: {self.email}' + + def __repr__(self) -> str: + return f'User(admin = {self.is_admin})' + if __name__ == '__main__': user_instance = User(user_id=3, email='dev@yandex.ru', is_admin=True) diff --git a/level_7/f_students_group.py b/level_7/f_students_group.py index b5a0d02..fbd1a1e 100644 --- a/level_7/f_students_group.py +++ b/level_7/f_students_group.py @@ -15,6 +15,12 @@ def __init__(self, group_number: int, grades: list[int]): self.group_number = group_number self.grades = grades + def __add__(self, other: 'StudentGroup') -> int: + if isinstance(other, StudentGroup): + return sum(self.grades + other.grades) + else: + raise ValueError("Нельзя складывать группы разных типов") + if __name__ == '__main__': first_group = StudentGroup(group_number=1, grades=[1, 4, 6, 3]) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..9ef2e10 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +ipython == 8.18.1 +mypy==1.7.0 \ No newline at end of file diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..651e2e9 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,41 @@ +[flake8] +exclude = + tests/* + +ignore = + D100, + D101, + D102, + D103, + D104, + D105, + D106, + D107, + WPS211, + WPS229, + WPS234, + WPS305, + WPS306, + WPS432, + W391, + S104 + +max-module-members = 12 +max-local-variables = 12 +max-line-length = 120 + + +[mypy] +warn_unreachable = True + +follow_imports = skip +strict_optional = True +warn_redundant_casts = True +warn_unused_ignores = True +no_implicit_reexport = True + +disallow_any_generics = True +check_untyped_defs = True +disallow_untyped_defs = True +ignore_missing_imports = True +disallow_untyped_calls = True \ No newline at end of file