Split SCons.Util even more, discourage implicit imports#4830
Split SCons.Util even more, discourage implicit imports#4830Repiteo wants to merge 3 commits intoSCons:masterfrom
SCons.Util even more, discourage implicit imports#4830Conversation
| StringTypes=StringTypes, | ||
| SequenceTypes=SequenceTypes, | ||
| StringTypes=StringTypes, # type: ignore | ||
| SequenceTypes=SequenceTypes, # type: ignore |
There was a problem hiding this comment.
Trying to use SCons.Util.sctypes.* here causes circular imports. Could maybe be circumvented with local import syntax, but it's simpler to just use the legacy values and silence the warnings.
|
I don't have a problem with this in concept. Away from big screens for a while, so is kind of hard to review. The new Tests.py files are all moved content, right? (UtilsTests has such a big diff it's collapsing it and not showing, means that'll be hard to tell visually). |
|
It's all moved content, correct |
SCons/Util/__init__.py
Outdated
| except KeyError: | ||
| return None | ||
| if is_String(path): | ||
| if SCons.Util.sctypes.is_String(path): |
There was a problem hiding this comment.
Why are you making this change? So intellisence will work?
There was a problem hiding this comment.
For intellisense, yes. However, that was a bit silly when I could've just suppressed the warnings, so I did that instead
|
I'm no longer 100% convinced that this is the best solution, so I'll be marking this as a draft for now. Will move the test changes to another PR |
Makes
SCons.Utilmore package-y with a couple of changes:SCons.Util's implicit imports. This keeps the functionality working as-is, but now intellisense and IDEs will discourage not using the correct package explicitly.UtilTests.py.Contributor Checklist:
CHANGES.txtandRELEASE.txt(and read theREADME.rst).