os.scandir#11365
Conversation
|
I forgot... Typing was added in 3.6. This causes the build for 3.5 to fail. I will update |
|
read for review |
| self.execre = re.compile(r'(.*)\.(%s)$' % winext,re.IGNORECASE) | ||
|
|
||
| # call up the chain | ||
| super(OSMagics, self).__init__(shell=shell, **kwargs) |
There was a problem hiding this comment.
This can be just super() since IPython requires Python 3
There was a problem hiding this comment.
thanks. I will update this
|
|
||
| dh = self.shell.user_ns['_dh'] | ||
| if parameter_s: | ||
| args = [] |
There was a problem hiding this comment.
Yes, it's overwritten on line 525 and the return on line 528 prevents a case where args is not in scope.
However, the linter wasn't fully aware of this and got worried that args may not be implemented at the time of use. Looking forward, if the except is changed to handle a specific exception, rather than a generic exception, then this will prevent args from being out of scope.
This may be over protective, so I can still remove the line in question if preferred.
…n osm init super call
| except OSError: | ||
| continue | ||
|
|
||
| # use with notation for python 3.6 onward |
There was a problem hiding this comment.
I guess you mean types annotations that you removed , I thing that can be trimmed now.
|
Not all your machines are setup with the same email, and/or github does not have all your emails so some commits do not appear as yours. I believe 3.5 have function signature types, so these would have been ok to leave in I think. There is 2 small leftover 1 debug statement and 1 comment. And we're good to merge IMHO. |
|
@meeseeksdev tag hacktoberfest |
|
Thanks. |
FIX #9914
I added os.scandir in two locations. I also updated how osm.py checked for executable
isexec. I took advantage of some type hinting. I don't think type hinting is used elsewhere in the code, so I can remove this if needed.