Skip to content

Conversation

@Bibo-Joshi
Copy link
Member

Tries to improve pre-commit settings in order to close #2414 and #2410. A few notes:

  1. remove make file. Rarely used, just needs maintenance
  2. make run pylint & mypy run locally, i.e. in the current venv instead of pre-commits own venv. Plus: mypy & pylint can correctly work with the installed packages, so no more differences between running manually (with the correct settings) and running pre-commit. Minus: requires user to have dev-deps correctly installed. The alternative would be to install all deps in the pre-commit env, but that requires maintenance and we have a pre-commit CI check in place anyway. So I'm good with this
  3. run mypy on the examples directory in a special test with additional arguments that essentially remove the need for stuff like message = cast(Message, update.message). IMO that would be too much for the examples, as not everyone actually uses a type checker
  4. Some improvements in the code revealed by these changes
  5. for some freaking reason, pycharm seems to run pre-commit differently when commiting via the GUI and it fails. Haven't gotten to the bottom of it, but it and it probably shouldn't strictly stop us as long as CI succeeds, but I would still like to know because some of the pylint errors it show are acutally right. @Poolitzer maybe you can try to reproduce on your machine, maybe with a clean venv?

@Bibo-Joshi Bibo-Joshi added ⚙️ tests affected functionality: tests ⚙️ type-hinting affected functionality: type-hinting labels Mar 4, 2021
@Bibo-Joshi Bibo-Joshi requested a review from Poolitzer March 4, 2021 17:40
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there. Relax, I am just a little warning for the maintainers to release directly after merging your PR, otherwise we have broken examples and people might get confused :)

@Poolitzer
Copy link
Member

pre-commit setup worked in a clean venv for me, pylint fails though.

@Bibo-Joshi
Copy link
Member Author

pre-commit setup worked in a clean venv for me, pylint fails though.

also the pycharm auto-run thingy? what pylint fails do you get and how do you get them? (i.e. with pre-commit run pylint or with pycharm auto-run thingy?)

@Poolitzer
Copy link
Member

Poolitzer commented Mar 7, 2021

I did not use PyCharm's auto run thing, and I'm not 100% certain I know what you are referring to.

I used pythons build-in venv module to create a venv inside the cloned repo (checked out the branch ofc), then activated it and ran pre-commit install and then pre-commit run -a, as you changed in contributing.

I will paste the result from pylint in a minute.

@Poolitzer
Copy link
Member

Poolitzer commented Mar 7, 2021

long result incoming (python version is 3.9.2 btw):

pylint output

black....................................................................Passed
flake8...................................................................Passed
pylint...................................................................Failed
- hook id: pylint
- exit code: 2

************* Module telegram.message
telegram\message.py:293:22: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\message.py:309:19: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\message.py:447:22: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\message.py:460:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\message.py:460:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\message.py:509:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:585:21: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\message.py:585:58: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\message.py:585:67: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:586:9: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\message.py:586:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:611:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:616:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:655:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:660:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:709:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:714:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:759:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:764:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:807:12: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:810:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:847:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:850:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:856:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:894:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:900:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:907:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:949:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:953:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:961:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1000:19: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1008:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1013:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1055:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1057:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1094:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1098:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1108:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1151:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1155:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1198:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1202:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1208:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1250:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1304:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1357:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1408:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1414:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1417:30: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1462:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1527:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1583:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1585:23: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1643:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1673:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1676:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1678:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1715:22: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1716:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1719:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1721:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1774:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1775:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1815:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1816:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1855:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1888:22: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1891:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1931:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:1971:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:2002:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:2008:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:2041:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\message.py:2303:22: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\message.py:2307:9: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\message.py:2461:22: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\message.py:2466:9: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.passport.credentials
telegram\passport\credentials.py:56:32: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\passport\credentials.py:158:30: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\passport\credentials.py:225:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\passport\credentials.py:225:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\passport\credentials.py:296:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\passport\credentials.py:296:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\passport\credentials.py:369:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\passport\credentials.py:369:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.inline.inlinequeryresultcachedmpeg4gif
telegram\inline\inlinequeryresultcachedmpeg4gif.py:85:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.inline.inlinekeyboardmarkup
telegram\inline\inlinekeyboardmarkup.py:62:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\inline\inlinekeyboardmarkup.py:62:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.inline.inlinequeryresultcacheddocument
telegram\inline\inlinequeryresultcacheddocument.py:88:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.parsemode
telegram\parsemode.py:29:14: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\parsemode.py:36:17: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\parsemode.py:38:10: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)

------------------------------------------------------------------
Your code has been rated at 4.00/10 (previous run: 4.00/10, +0.00)

************* Module telegram.files.document
telegram\files\document.py:89:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\files\document.py:89:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.payment.shippingquery
telegram\payment\shippingquery.py:76:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\payment\shippingquery.py:76:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.files.video
telegram\files\video.py:99:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\files\video.py:99:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.ext.utils.webhookhandler
telegram\ext\utils\webhookhandler.py:54:19: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.inline.inlinequeryresultcachedvideo
telegram\inline\inlinequeryresultcachedvideo.py:88:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.ext.callbackcontext
telegram\ext\callbackcontext.py:100:25: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\callbackcontext.py:101:25: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\callbackcontext.py:102:19: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\callbackcontext.py:103:22: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\callbackcontext.py:104:20: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\callbackcontext.py:105:18: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\callbackcontext.py:106:25: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\callbackcontext.py:106:34: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\ext\callbackcontext.py:107:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\callbackcontext.py:125:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\callbackcontext.py:135:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\callbackcontext.py:150:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\ext\callbackcontext.py:188:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\callbackcontext.py:208:23: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.ext.conversationhandler
telegram\ext\conversationhandler.py:42:18: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\conversationhandler.py:51:26: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)

------------------------------------------------------------------
Your code has been rated at 9.08/10 (previous run: 9.08/10, +0.00)

************* Module telegram.chatmember
telegram\chatmember.py:118:19: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chatmember.py:120:13: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chatmember.py:122:12: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chatmember.py:124:10: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chatmember.py:126:12: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chatmember.py:128:16: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chatmember.py:182:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\chatmember.py:182:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.choseninlineresult
telegram\choseninlineresult.py:84:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\choseninlineresult.py:84:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.utils.request
telegram\utils\request.py:161:24: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\utils\request.py:200:36: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\utils\request.py:286:71: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.inline.inlinequeryresultdocument
telegram\inline\inlinequeryresultdocument.py:102:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)

------------------------------------------------------------------
Your code has been rated at 8.47/10 (previous run: 8.47/10, +0.00)

************* Module telegram.bot
telegram\bot.py:183:19: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:184:24: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:200:9: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:240:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:266:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:272:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:416:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:421:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:426:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:488:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:489:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:533:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:534:22: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:535:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:584:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:587:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:593:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:673:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:674:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:680:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:687:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:794:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:795:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:799:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:807:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:903:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:904:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:906:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:967:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:968:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:972:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:982:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1093:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1094:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1098:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1192:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1193:19: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1201:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1206:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1309:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1310:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1314:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1320:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1407:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1409:12: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1412:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1465:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1469:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1561:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1562:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1563:27: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1573:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1650:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1651:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1652:27: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1656:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1700:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1707:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1812:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1817:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1898:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1901:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1952:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1992:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:1993:59: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2152:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2157:9: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2193:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2253:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2254:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2256:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2303:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2304:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2411:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2412:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2413:27: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2419:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2420:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2482:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2483:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2484:27: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2490:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2491:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2557:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2558:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2559:27: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2564:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2624:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2625:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2626:27: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2627:22: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2630:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2892:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2923:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2956:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:2991:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3022:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3023:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3055:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3088:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3140:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3142:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3143:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3144:27: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3149:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3204:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3205:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3206:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3207:27: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3252:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3270:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3272:23: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3517:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3518:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3520:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3578:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3579:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3662:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3698:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3699:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3738:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3772:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3811:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3845:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3881:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3917:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3918:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3962:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:3965:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4003:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4069:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4114:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4203:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4348:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4399:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4440:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4449:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4455:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4458:30: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4561:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4562:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4607:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4609:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4696:23: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4780:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4781:22: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4782:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4785:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\bot.py:4787:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.ext.jobqueue
telegram\ext\jobqueue.py:72:46: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\ext\jobqueue.py:101:14: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\ext\jobqueue.py:108:14: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\ext\jobqueue.py:110:9: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\jobqueue.py:145:14: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\ext\jobqueue.py:212:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\ext\jobqueue.py:213:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\ext\jobqueue.py:214:14: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\ext\jobqueue.py:613:24: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.games.game
telegram\games\game.py:92:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\games\game.py:92:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.ext.utils.promise
telegram\ext\utils\promise.py:61:14: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\ext\utils\promise.py:72:22: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\utils\promise.py:73:25: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\utils\promise.py:90:47: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\utils\promise.py:110:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.passport.encryptedpassportelement
telegram\passport\encryptedpassportelement.py:164:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\passport\encryptedpassportelement.py:164:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\passport\encryptedpassportelement.py:180:19: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\passport\encryptedpassportelement.py:181:9: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)************* Module telegram.inline.inlinequeryresultaudio
telegram\inline\inlinequeryresultaudio.py:88:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.replykeyboardmarkup
telegram\replykeyboardmarkup.py:70:36: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\replykeyboardmarkup.py:97:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\replykeyboardmarkup.py:109:16: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\replykeyboardmarkup.py:154:25: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\replykeyboardmarkup.py:200:28: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)

------------------------------------------------------------------
Your code has been rated at 4.02/10 (previous run: 4.02/10, +0.00)

************* Module telegram.files.audio
telegram\files\audio.py:102:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\files\audio.py:102:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.inline.inlinequeryresultgif
telegram\inline\inlinequeryresultgif.py:103:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.__main__
telegram\__main__.py:29:23: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.messageentity
telegram\messageentity.py:84:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:84:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:94:13: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:96:13: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:98:13: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:100:18: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:102:17: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:104:9: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:106:11: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:108:10: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:110:12: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:112:10: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:114:9: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:116:15: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:118:18: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:120:15: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:122:19: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\messageentity.py:124:15: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
************* Module telegram.update
telegram\update.py:131:30: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\update.py:132:30: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\update.py:133:33: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\update.py:138:32: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\update.py:177:32: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\update.py:210:35: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\update.py:243:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\update.py:243:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.ext.updater
telegram\ext\updater.py:251:9: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\updater.py:318:9: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\updater.py:689:33: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.payment.precheckoutquery
telegram\payment\precheckoutquery.py:95:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\payment\precheckoutquery.py:95:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.files.inputmedia
telegram\files\inputmedia.py:46:22: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\files\inputmedia.py:117:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\files\inputmedia.py:124:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\files\inputmedia.py:130:24: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\files\inputmedia.py:189:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\files\inputmedia.py:192:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\files\inputmedia.py:269:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\files\inputmedia.py:277:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\files\inputmedia.py:283:24: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\files\inputmedia.py:368:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\files\inputmedia.py:375:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\files\inputmedia.py:381:24: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\files\inputmedia.py:456:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\files\inputmedia.py:461:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.payment.successfulpayment
telegram\payment\successfulpayment.py:87:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\payment\successfulpayment.py:87:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)

------------------------------------------------------------------
Your code has been rated at 6.90/10 (previous run: 6.90/10, +0.00)

************* Module telegram.payment.orderinfo
telegram\payment\orderinfo.py:68:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\payment\orderinfo.py:68:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.passport.passportdata
telegram\passport\passportdata.py:65:30: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\passport\passportdata.py:69:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\passport\passportdata.py:69:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.files.sticker
telegram\files\sticker.py:108:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\files\sticker.py:108:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\files\sticker.py:183:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\files\sticker.py:183:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\files\sticker.py:233:14: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\files\sticker.py:235:10: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\files\sticker.py:237:11: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\files\sticker.py:239:10: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\files\sticker.py:251:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\files\sticker.py:251:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.ext.dispatcher
telegram\ext\dispatcher.py:168:26: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\dispatcher.py:194:44: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\ext\dispatcher.py:226:33: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\dispatcher.py:606:19: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\ext\dispatcher.py:651:22: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.utils.helpers
telegram\utils\helpers.py:79:23: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\utils\helpers.py:79:32: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\utils\helpers.py:97:16: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\utils\helpers.py:101:5: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\utils\helpers.py:198:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\utils\helpers.py:291:12: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\utils\helpers.py:294:5: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\utils\helpers.py:308:29: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\utils\helpers.py:308:73: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\utils\helpers.py:333:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\utils\helpers.py:345:30: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\utils\helpers.py:359:35: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\utils\helpers.py:359:66: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\utils\helpers.py:569:23: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)

------------------------------------------------------------------
Your code has been rated at 8.02/10 (previous run: 8.02/10, +0.00)

************* Module telegram.games.gamehighscore
telegram\games\gamehighscore.py:56:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\games\gamehighscore.py:56:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.chatlocation
telegram\chatlocation.py:62:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\chatlocation.py:62:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.inline.inlinequeryresultvideo
telegram\inline\inlinequeryresultvideo.py:110:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.ext.defaults
telegram\ext\defaults.py:125:28: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\defaults.py:136:40: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\defaults.py:147:38: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\defaults.py:158:42: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\defaults.py:169:45: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\ext\defaults.py:191:23: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.inline.inlinequeryresultmpeg4gif
telegram\inline\inlinequeryresultmpeg4gif.py:102:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)

------------------------------------------------------------------
Your code has been rated at 7.55/10 (previous run: 7.55/10, +0.00)

************* Module telegram.poll
telegram\poll.py:57:16: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\poll.py:89:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\poll.py:89:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\poll.py:182:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\poll.py:182:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\poll.py:264:13: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\poll.py:266:10: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\poll.py:268:25: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\poll.py:270:23: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
************* Module telegram.files.videonote
telegram\files\videonote.py:88:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\files\videonote.py:88:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.inline.inputtextmessagecontent
telegram\inline\inputtextmessagecontent.py:67:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)

------------------------------------------------------------------
Your code has been rated at 8.91/10 (previous run: 8.91/10, +0.00)

************* Module telegram.dice
telegram\dice.py:69:10: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\dice.py:71:11: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\dice.py:73:16: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\dice.py:75:14: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\dice.py:77:18: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\dice.py:79:15: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
************* Module telegram.inline.inlinequeryresultcachedphoto
telegram\inline\inlinequeryresultcachedphoto.py:89:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.files.file
telegram\files\file.py:86:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\files\file.py:92:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)

------------------------------------------------------------------
Your code has been rated at 8.96/10 (previous run: 8.96/10, +0.00)

************* Module telegram.files.venue
telegram\files\venue.py:87:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\files\venue.py:87:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.inline.inlinequeryresultcachedgif
telegram\inline\inlinequeryresultcachedgif.py:85:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.passport.passportfile
telegram\passport\passportfile.py:84:19: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\passport\passportfile.py:85:9: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\passport\passportfile.py:97:19: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\passport\passportfile.py:98:14: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.utils.types
telegram\utils\types.py:27:11: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\utils\types.py:30:12: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\utils\types.py:37:41: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\utils\types.py:41:11: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\utils\types.py:41:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\utils\types.py:44:10: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\utils\types.py:49:6: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.proximityalerttriggered
telegram\proximityalerttriggered.py:57:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\proximityalerttriggered.py:57:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.inline.inlinequeryresultphoto
telegram\inline\inlinequeryresultphoto.py:98:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.inline.inlinequery
telegram\inline\inlinequery.py:86:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\inline\inlinequery.py:86:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\inline\inlinequery.py:99:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\inline\inlinequery.py:100:59: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\inline\inlinequery.py:147:17: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)

------------------------------------------------------------------
Your code has been rated at 7.94/10 (previous run: 7.94/10, +0.00)

************* Module telegram.userprofilephotos
telegram\userprofilephotos.py:55:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\userprofilephotos.py:55:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.inline.inlinequeryresultcachedvoice
telegram\inline\inlinequeryresultcachedvoice.py:82:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.base
telegram\base.py:48:25: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\base.py:48:48: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\base.py:54:37: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\base.py:54:72: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\base.py:65:37: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\base.py:65:83: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.inline.inlinequeryresultcachedaudio
telegram\inline\inlinequeryresultcachedaudio.py:79:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.files.inputfile
telegram\files\inputfile.py:53:28: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\files\inputfile.py:82:35: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\files\inputfile.py:108:25: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
************* Module telegram.chat
telegram\chat.py:136:13: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:138:11: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:140:16: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:142:13: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:193:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:211:22: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:219:52: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:296:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:319:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:321:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:350:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:375:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:419:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:421:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:473:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:499:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:529:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:581:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:586:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:615:12: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:618:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:671:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:674:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:680:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:714:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:749:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:755:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:762:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:796:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:800:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:808:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:840:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:872:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:918:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:920:23: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:971:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1011:19: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1019:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1024:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1058:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1060:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1095:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1136:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1140:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1150:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1185:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1189:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1224:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1228:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1234:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1274:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1280:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1283:30: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1319:22: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1320:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1323:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1325:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1358:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1359:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1362:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\chat.py:1364:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.callbackquery
telegram\callbackquery.py:115:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:115:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:164:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:165:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:213:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:214:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:256:22: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:259:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:306:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:352:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:404:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:441:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:447:9: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:488:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:596:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:599:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:601:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\callbackquery.py:636:28: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
************* Module telegram.chataction
telegram\chataction.py:28:19: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chataction.py:30:18: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chataction.py:32:18: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chataction.py:34:23: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chataction.py:36:12: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chataction.py:38:18: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chataction.py:40:21: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chataction.py:42:18: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chataction.py:44:18: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
telegram\chataction.py:46:23: E1136: Value 'ClassVar' is unsubscriptable (unsubscriptable-object)
************* Module telegram.inline.inlinequeryresultvoice
telegram\inline\inlinequeryresultvoice.py:86:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)

--------------------------------------------------------------------
Your code has been rated at -2.12/10 (previous run: -2.12/10, +0.00)

************* Module telegram.user
telegram\user.py:146:22: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\user.py:160:9: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\user.py:224:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:253:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:304:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:309:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:337:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:340:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:346:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:377:12: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:380:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:407:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:413:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:420:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:484:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:520:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:550:18: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:554:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:562:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:595:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:641:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:643:23: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:694:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:734:19: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:742:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:747:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:781:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:783:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:812:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:816:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:826:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:867:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:908:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:912:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:947:15: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:951:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:957:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:997:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:1003:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:1006:30: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:1042:22: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:1043:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:1046:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:1048:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:1081:17: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:1082:20: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:1085:26: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
telegram\user.py:1087:29: E1136: Value 'Union' is unsubscriptable (unsubscriptable-object)
************* Module telegram.files.animation
telegram\files\animation.py:98:27: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)
telegram\files\animation.py:98:62: E1136: Value 'Optional' is unsubscriptable (unsubscriptable-object)

--------------------------------------------------------------------
Your code has been rated at -1.36/10 (previous run: -1.36/10, +0.00)

mypy-ptb.................................................................Passed
mypy-examples............................................................Passed
pyupgrade................................................................Passed

@Bibo-Joshi
Copy link
Member Author

Ah, that's due to pylint not working properly on py 3.8+ iirc. I'll check if buming to v2.7 helps. Otherwise I'll revert to having pre-commit run in it's own venv, where we can choose the python version.
With the pycharm thingy I mean this:

screenshot

that makes pycharm run the hooks before commiting and for me that results in an error message that pops up in the bottom right corner.

@Poolitzer
Copy link
Member

and for me that results in an error message that pops up in the bottom right corner.

So you want me to check if I get the same error message?

@Poolitzer
Copy link
Member

Poolitzer commented Mar 8, 2021

apparently the environments dont install correctly there, I get an error as well:

pre-commit output

``` 13:41 Commit failed with error 0 file committed, 1 file failed to commit: this is a test [INFO] Installing environment for https://gitlab.com/pycqa/flake8. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/asottile/pyupgrade. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... black....................................................................Passed flake8...................................................................Passed pylint...................................................................Failed - hook id: pylint - exit code: 1

		Executable `pylint` not found
		
		mypy-ptb.................................................................Failed
		- hook id: mypy-ptb
		- exit code: 1
		
		Executable `mypy` not found
		
		mypy-examples........................................(no files to check)Skipped
		pyupgrade................................................................Passed
</p></details>

@Bibo-Joshi
Copy link
Member Author

Bibo-Joshi commented Mar 8, 2021

All right, so:

  • bumping pylint to 2.7 so that we can run it on py3.8+, as well
  • rolling back from local pre-commit hooks. Instead I added additional_dependencies in the hooks. a few notes on that:
    • while IDE quirks should maybe not be a reason to change settings, most of the dev team works with PyCharm and I see no reason to make our lifes harder than necessary
    • OTOH the additional maintenance effort of bumping versions for deps in two files when need is not high, as we seldomly do so. Also I left comments in both files to remind ourself about it. If we want to be thorough, we can add another of the "examples changed"-style GHA flows (done).
    • Unfortunately I did not find any information about how pre-commit handles . as additional dependency, but it seems to do the right thing: If I e.g. remove the Update.message attribute and run pre-commit, I get linter errors in all the examples. So it apparently does something similar to pip install -e .

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Looks like you edited the (dev) requirements or the pre-commit hooks. I'm just a friendly reminder too keep the pre-commit hook versions in sync with the dev requirements and the additional dependencies for the hooks in sync with the requirements :)

Copy link
Member

@harshil21 harshil21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some typos.

Btw when I ran pre-commit run -a in this branch locally, I still got this error for mypy:

mypy-ptb.................................................................Failed
- hook id: mypy
- exit code: 1

telegram/ext/utils/webhookhandler.py:126: error: Module has no attribute "WindowsProactorEventLoopPolicy"; maybe "AbstractEventLoopPolicy"?  [attr-defined]
Found 1 error in 1 file (checked 136 source files)

Just confirming if you got this too, or is it only me?

Copy link
Member Author

@harshil21 Thanks! The mypy error you're seeing is due to you not running on Windows, IG. will add a # type: ignore…

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Looks like you edited the (dev) requirements or the pre-commit hooks. I'm just a friendly reminder to keep the pre-commit hook versions in sync with the dev requirements and the additional dependencies for the hooks in sync with the requirements :)

@Bibo-Joshi Bibo-Joshi added this to the v13.4 milestone Mar 11, 2021
Copy link
Member

@Poolitzer Poolitzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes LGTM

@Bibo-Joshi Bibo-Joshi merged commit 3a9a0ab into master Mar 13, 2021
@Bibo-Joshi Bibo-Joshi deleted the fix-health-tests branch March 13, 2021 15:21
@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

⚙️ tests affected functionality: tests ⚙️ type-hinting affected functionality: type-hinting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[mypy]: make mypy and pre-commit run mypy results differ [mypy]: ignore at file begin does not accept error code, silently ignores all errors instead

4 participants