- π± Iβm currently learning: C++/Rust, C#, JS/TS, T-SQL/PLPGSQL
- π« Feel free to ping me on: [email protected] and t.me/forevka
- π Checkout my site: https://blog.forevka.dev
β¨ Trying to find myself in different things β¨
β¨ Trying to find myself in different things β¨
I've selected for refactoring 27 lines of code which are duplicated in 2 file(s) (1, 2). Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Code Once guideline rating! π
Here's the gist of this guideline:
You can find more info about this guideline in Building Maintainable Software. π
βΉοΈ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the π² next to them. The risk profile below the candidates signals (β ) when it's enough! π
Good luck and happy coding! β¨ π―
I've selected for refactoring 37 lines of code which are duplicated in 2 file(s) (1, 2). Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Code Once guideline rating! π
Here's the gist of this guideline:
You can find more info about this guideline in Building Maintainable Software. π
βΉοΈ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the π² next to them. The risk profile below the candidates signals (β ) when it's enough! π
Good luck and happy coding! β¨ π―
when user deleted account they still can click on button with not existed account, and it produces error
`2021-03-21 15:22:34.554 | ERROR | asyncio.base_events:default_exception_handler:1707 - Task exception was never retrieved
future: <Task finished name='Task-13006' coro=<Dispatcher._process_polling_updates() done, defined at /usr/local/lib/python3.8/site-packages/aiogram/dispatcher/dispatcher.py:380> exception=AttributeError("'NoneType' object has no attribute 'username'")>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiogram/dispatcher/dispatcher.py", line 388, in process_polling_updates
for responses in itertools.chain.from_iterable(await self.process_updates(updates, fast)):
β β β β β β β True
β β β β β β [<aiogram.types.update.Update object at 0x7fc46e6ad9a0>]
β β β β β <function Dispatcher.process_updates at 0x7fc46fde5b80>
β β β β <aiogram.dispatcher.dispatcher.Dispatcher object at 0x7fc4716be370>
β β β <method 'from_iterable' of 'itertools.chain' objects>
β β <class 'itertools.chain'>
β <module 'itertools' (built-in)>
File "/usr/local/lib/python3.8/site-packages/aiogram/dispatcher/dispatcher.py", line 225, in process_updates
return await asyncio.gather(*tasks)
β β β [<coroutine object Handler.notify at 0x7fc46f4f7c40>]
β β <function gather at 0x7fc471315430>
β <module 'asyncio' from '/usr/local/lib/python3.8/asyncio/init.py'>
File "/usr/local/lib/python3.8/site-packages/aiogram/dispatcher/handler.py", line 117, in notify
response = await handler_obj.handler(*args, **partial_data)
β β β β {}
β β β (<aiogram.types.update.Update object at 0x7fc46e6ad9a0>,)
β β <bound method Dispatcher.process_update of <aiogram.dispatcher.dispatcher.Dispatcher object at 0x7fc4716be370>>
β Handler.HandlerObj(handler=<bound method Dispatcher.process_update of <aiogram.dispatcher.dispatcher.Dispatcher object at 0x7...
File "/usr/local/lib/python3.8/site-packages/aiogram/dispatcher/dispatcher.py", line 273, in process_update
return await self.callback_query_handlers.notify(update.callback_query)
β β β β β <aiogram.types.fields.Field object at 0x7fc46ffb4670>
β β β β <aiogram.types.update.Update object at 0x7fc46e6ad9a0>
β β β <function Handler.notify at 0x7fc46ff2a310>
β β <aiogram.dispatcher.handler.Handler object at 0x7fc470953100>
β <aiogram.dispatcher.dispatcher.Dispatcher object at 0x7fc4716be370>
File "/usr/local/lib/python3.8/site-packages/aiogram/dispatcher/handler.py", line 117, in notify
response = await handler_obj.handler(*args, **partial_data)
β β β β {'user': <database.user_repo.UserRepository object at 0x7fc46f383be0>, '': {'choose_account_to_delete': 'ΠΡΠ±Π΅ΡΠΈ ΠΊΠ°ΠΊΠΎΠΉ Π°ΠΊΠΊΠ°ΡΠ½...
β β β (<aiogram.types.callback_query.CallbackQuery object at 0x7fc46e6805e0>,)
β β <function account_cabinet_callback_handler at 0x7fc46f6e0160>
β Handler.HandlerObj(handler=<function account_cabinet_callback_handler at 0x7fc46f6e0160>, spec=FullArgSpec(args=['query', 'ca...
File "/app/handlers/callback/account_cabinet_handler.py", line 70, in account_cabinet_callback_handler
account_name=account.username
β None
AttributeError: 'NoneType' object has no attribute 'username'`
where to fix
https://github.com/Forevka/Emcd/blob/master/handlers/callback/account_cabinet_handler.py#L66
I've selected for refactoring 22 lines of code which are duplicated in 2 file(s) (1, 2). Addressing this will make our codebase more maintainable and improve Better Code Hub's Write Code Once guideline rating! π
Here's the gist of this guideline:
You can find more info about this guideline in Building Maintainable Software. π
βΉοΈ To know how many other refactoring candidates need addressing to get a guideline compliant, select some by clicking on the π² next to them. The risk profile below the candidates signals (β ) when it's enough! π
Good luck and happy coding! β¨ π―
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.