-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tweak Python icons #85
Conversation
icons/icons.json
Outdated
".python-version" | ||
], | ||
"name": "Plain Text (Python)", | ||
"scope": "text.plain.python" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two definitions with same scope doesn't work. Also do we really need dedicated icons for every python related meta-data file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I certainly do not think so, but I wouldn't consider these "every python related meta-data file" - just the bare minimum expected in a reasonably-sized Python project and tied to the tools included with the runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to extend source.python
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I'm not too convinced myself that changing .python-version
is a good idea given that the icon has been present for quite some time and people have gotten accustomed to it - reverting...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, except requirements.txt most other python related meta data or configuration files are just INI, TOML or empty text files.
I am not yet convinced of adding a dedicated icon for each file type, actually.
"base": "source.python", | ||
"extensions": [ | ||
"py.typed" | ||
], | ||
"name": "Python (PEP 561)", | ||
"scope": "source.python.typed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just an empty marker file, isn't it? Hence creating an alias from a full python syntax is waste of resources.
"base": "source.python", | |
"extensions": [ | |
"py.typed" | |
], | |
"name": "Python (PEP 561)", | |
"scope": "source.python.typed" | |
"extensions": [ | |
"py.typed" | |
], | |
"name": "Python (PEP 561)", | |
"scope": "text.python.typed" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"requirements.in", | ||
"requirements.txt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about the requirements-dev.txt
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish this was standardised, but instead we have:
*-requirements.txt
(flake8, mypy, urllib3)*_requirements.txt
(black, numpy)requirements-*.txt
(Chalice, FastAPI, nox, pre-commit, Pyre, PyTorch, requests)requirements_*.txt
(TensorFlow)- none of the above (Click, Flask, Jinja, sam)
Sublime doesn't offer an easy way out; do I have to include every possible permutation here?
icons/icons.json
Outdated
], | ||
"color": "blue" | ||
}, | ||
"file_type_python_version": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The associated icon is not dedicated to a versions but looks more like generic "python settings" or "python config".
It would therefore also fit for .flake8
, pyproject.toml
or any other python related configuration file.
However, it's probably not feasable to override all file types like TOML or INI with application specific icons as it causes type information to become augmented, but maybe there are some more which could use this icon.
As such a more common name (e.g.: file_type_python_settings
or file_type_settings_python
) would probably be more suitable.
Actually I'd probably assign all meta files like py.typed
, .python-version
and maybe special purpose files such as .flake8
to a single icon if we want to distinguish them from normal python sources - maybe even requirements.txt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree regarding .flake8
et al. Is the new definition fine?
This commit: - adds PyPI icon to related files (`requirements.in`, `requirements.txt`) - adds a modified Python icon to `py.typed` files - adds a Python settings hybrid icon to Python-related configuration files
Description
This commit:
requirements.in
,requirements.txt
)py.typed
files.python-version
filesMotivation and Context
Improved visual grepping in Python projects.
How Has This Been Tested?
py.typed
requirements.in
requirements.txt
Types of changes:
Checklist: