Skip to content

Commit 615f0dc

Browse files
authored
Fix ColorAide API usage (#65)
1 parent 5fb2bea commit 615f0dc

File tree

13 files changed

+164
-119
lines changed

13 files changed

+164
-119
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ jobs:
1414
tests:
1515

1616
env:
17-
TOXENV: py38
17+
TOXENV: py311
1818

1919
runs-on: ubuntu-latest
2020

2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
2323
- name: Set up Python
24-
uses: actions/setup-python@v1
24+
uses: actions/setup-python@v4
2525
with:
26-
python-version: 3.9
26+
python-version: 3.11
2727
- name: Install dependencies
2828
run: |
29-
python -m pip install --upgrade pip setuptools tox
29+
python -m pip install --upgrade pip setuptools tox build
3030
- name: Tests
3131
run: |
3232
python -m tox
@@ -39,14 +39,14 @@ jobs:
3939
runs-on: ubuntu-latest
4040

4141
steps:
42-
- uses: actions/checkout@v2
42+
- uses: actions/checkout@v4
4343
- name: Set up Python
44-
uses: actions/setup-python@v1
44+
uses: actions/setup-python@v4
4545
with:
46-
python-version: 3.9
46+
python-version: 3.11
4747
- name: Install dependencies
4848
run: |
49-
python -m pip install --upgrade pip setuptools tox
49+
python -m pip install --upgrade pip setuptools tox build
5050
- name: Lint
5151
run: |
5252
python -m tox
@@ -59,14 +59,14 @@ jobs:
5959
runs-on: ubuntu-latest
6060

6161
steps:
62-
- uses: actions/checkout@v2
62+
- uses: actions/checkout@v4
6363
- name: Set up Python
64-
uses: actions/setup-python@v1
64+
uses: actions/setup-python@v4
6565
with:
66-
python-version: 3.9
66+
python-version: 3.11
6767
- name: Install dependencies
6868
run: |
69-
python -m pip install --upgrade pip setuptools tox
69+
python -m pip install --upgrade pip setuptools tox build
7070
- name: Install Aspell
7171
run: |
7272
sudo apt-get install aspell aspell-en

.github/workflows/deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1616
with:
1717
fetch-depth: 0
1818
- name: Set up Python
19-
uses: actions/setup-python@v1
19+
uses: actions/setup-python@v4
2020
with:
21-
python-version: 3.9
21+
python-version: 3.11
2222
- name: Install dependencies
2323
run: |
24-
python -m pip install --upgrade pip setuptools
24+
python -m pip install --upgrade pip setuptools build
2525
python -m pip install -r docs/src/requirements.txt
2626
- name: Deploy documents
2727
run: |

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# ScopeHunter
22

3+
## 2.18.2
4+
5+
- **FIX**: Fix color API access failures.
6+
37
## 2.18.1
48

59
- **FIX**: Scope backtrace fixes.

docs/src/markdown/about/contributing.md

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ ST3 | Fully supported and actively maintained.
99

1010
Contribution from the community is encouraged and can be done in a variety of ways:
1111

12-
- Bug reports.
13-
- Reviewing code.
14-
- Code patches via pull requests.
15-
- Documentation improvements via pull requests.
12+
- Bug reports.
13+
- Reviewing code.
14+
- Code patches via pull requests.
15+
- Documentation improvements via pull requests.
1616

1717
## Become a Sponsor :octicons-heart-fill-16:{: .heart-throb}
1818

@@ -24,27 +24,27 @@ any tier you feel comfortable with. No amount is too little. We also accept one
2424

2525
## Bug Reports
2626

27-
1. Please **read the documentation** and **search the issue tracker** to try to find the answer to your question
28-
**before** posting an issue.
27+
1. Please **read the documentation** and **search the issue tracker** to try to find the answer to your question
28+
**before** posting an issue.
2929

30-
2. When an issue is created, a [template](https://github.com/facelessuser/ScopeHunter/blob/master/.github/ISSUE_TEMPLATE.md)
31-
will be shown, please fill out the appropriate sections. If the template is not followed, the issue will be marked
32-
`Invalid` and closed.
30+
2. When an issue is created, a [template](https://github.com/facelessuser/ScopeHunter/blob/master/.github/ISSUE_TEMPLATE.md)
31+
will be shown, please fill out the appropriate sections. If the template is not followed, the issue will be marked
32+
`Invalid` and closed.
3333

34-
3. When creating an issue on the repository, please provide as much info as possible:
34+
3. When creating an issue on the repository, please provide as much info as possible:
3535

36-
- Provide environment information by running `Preferences->Package Settings->RegReplace->Support Info`. The
37-
information will be copied to the clipboard; paste the info in issue.
38-
- Errors in console.
39-
- Detailed description of the problem.
40-
- Examples for reproducing the error. You can post pictures, but if specific text or code is required to reproduce
41-
the issue, please provide the text in a plain text format for easy copy/paste.
42-
- Provide link to color scheme used (with link if a 3rd party color scheme) if applicable.
36+
- Provide environment information by running `Preferences->Package Settings->RegReplace->Support Info`. The
37+
information will be copied to the clipboard; paste the info in issue.
38+
- Errors in console.
39+
- Detailed description of the problem.
40+
- Examples for reproducing the error. You can post pictures, but if specific text or code is required to
41+
reproduce the issue, please provide the text in a plain text format for easy copy/paste.
42+
- Provide link to color scheme used (with link if a 3rd party color scheme) if applicable.
4343

4444
The more info provided the greater the chance someone will take the time to answer, implement, or fix the issue.
4545

46-
4. Be prepared to answer questions and provide additional information if required. Issues in which the creator refuses
47-
to respond to follow up questions will be marked as stale and closed.
46+
4. Be prepared to answer questions and provide additional information if required. Issues in which the creator refuses
47+
to respond to follow up questions will be marked as stale and closed.
4848

4949
## Reviewing Code
5050

@@ -63,20 +63,21 @@ it is strongly suggested that requesters make an effort to verify before request
6363

6464
### Running Validation Tests
6565

66-
!!! tip "Tip"
67-
If you are running Sublime on a macOS or Linux/Unix system, you run all tests by by running the shell script
68-
(assuming you have installed your environment fulfills all requirements below):
66+
/// tip | Tip
67+
If you are running Sublime on a macOS or Linux/Unix system, you run all tests by by running the shell script
68+
(assuming you have installed your environment fulfills all requirements below):
6969

70-
```
71-
chmod +x run_tests.sh
72-
./run_tests.sh
73-
```
70+
```
71+
chmod +x run_tests.sh
72+
./run_tests.sh
73+
```
74+
///
7475

7576
There are a couple of dependencies that must be present before running the tests.
7677

77-
1. As ST3 is the only current, actively supported version, Python 3.3 must be used to validate the tests.
78+
1. As ST3 is the only current, actively supported version, Python 3.3 must be used to validate the tests.
7879

79-
2. Unit tests are run with pytest (@pytest-dev/pytest). You can install `pytest` via:
80+
2. Unit tests are run with pytest (@pytest-dev/pytest). You can install `pytest` via:
8081

8182
```
8283
pip install pytest
@@ -88,13 +89,13 @@ There are a couple of dependencies that must be present before running the tests
8889
py.test .
8990
```
9091
91-
3. Linting is performed on the entire project with the following modules:
92+
3. Linting is performed on the entire project with the following modules:
9293
93-
- @gitlab:pycqa/flake8
94-
- @gitlab:pycqa/flake8-docstrings
95-
- @ebeweber/flake8-mutable
96-
- @gforcada/flake8-builtins
97-
- @gitlab:pycqa/pep8-naming
94+
- @gitlab:pycqa/flake8
95+
- @gitlab:pycqa/flake8-docstrings
96+
- @ebeweber/flake8-mutable
97+
- @gforcada/flake8-builtins
98+
- @gitlab:pycqa/pep8-naming
9899
99100
These can be installed via:
100101

docs/src/markdown/about/license.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@
22

33
Scope Hunter is released under the MIT license.
44

5-
Copyright (c) 2012 - 2022 Isaac Muse <[email protected]>
5+
Copyright (c) 2012 - 2025 Isaac Muse <[email protected]>
66

7-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
8+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
9+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
10+
persons to whom the Software is furnished to do so, subject to the following conditions:
811

9-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
13+
Software.
1014

11-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
16+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
18+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

docs/src/markdown/index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ development.
1212
## Features
1313
All features are configurable via the settings file
1414

15-
- Tooltip output showing scope, context backtrace, scope extent, color values, links to current syntax and relevant
16-
color schemes.
17-
- Customizable to show only the information you care about.
18-
- Auto copy scope to clipboard on execution.
19-
- Quick copy any or all information to the clipboard.
20-
- Toggle instant scoping to keep showing scope as you move around a file.
21-
- Supports [SubNotify][subnotify] messages.
15+
- Tooltip output showing scope, context backtrace, scope extent, color values, links to current syntax and relevant
16+
color schemes.
17+
- Customizable to show only the information you care about.
18+
- Auto copy scope to clipboard on execution.
19+
- Quick copy any or all information to the clipboard.
20+
- Toggle instant scoping to keep showing scope as you move around a file.
21+
- Supports [SubNotify][subnotify] messages.
2222

2323
--8<-- "refs.txt"

docs/src/markdown/installation.md

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,51 @@
22

33
## Package Control
44

5-
The recommended way to install ScopeHunter is via [Package Control][package-control]. Package Control will install the correct branch on your system and keep it up to date.
5+
The recommended way to install ScopeHunter is via [Package Control][package-control]. Package Control will install the
6+
correct branch on your system and keep it up to date.
67

7-
1. Ensure Package Control is installed. Instructions are found [here][package-control-install].
8+
1. Ensure Package Control is installed. Instructions are found [here][package-control-install].
89

9-
2. In Sublime Text, press ++ctrl+shift+p++ (Win, Linux) or ++cmd+shift+p++ (macOS) to bring up the quick panel and start typing `Package Control: Install Package`. Select the command and it will show a list of installable plugins.
10+
2. In Sublime Text, press ++ctrl+shift+p++ (Win, Linux) or ++cmd+shift+p++ (macOS) to bring up the quick panel and
11+
start typing `Package Control: Install Package`. Select the command and it will show a list of installable plugins.
1012

11-
3. Start typing `ScopeHunter`; when you see it, select it.
13+
3. Start typing `ScopeHunter`; when you see it, select it.
1214

13-
4. Restart to be sure everything is loaded proper.
15+
4. Restart to be sure everything is loaded proper.
1416

15-
5. Enjoy!
17+
5. Enjoy!
1618

1719
## Manual Installation
1820

19-
!!! warning "Warning"
20-
This is not the recommended way to install ScopeHunter for the average user. Installing this way **will not** get automatically updated.
21+
/// warning | Warning
22+
This is not the recommended way to install ScopeHunter for the average user. Installing this way **will not** get
23+
automatically updated.
2124

22-
If you are forking for a pull request, you should **just** clone ScopeHunter and run Package Control's `Satisfy Dependency` command to get all the dependencies.
25+
If you are forking for a pull request, you should **just** clone ScopeHunter and run Package Control's
26+
`Satisfy Dependency` command to get all the dependencies.
27+
///
2328

24-
For those who want to install ScopeHunter without package control, here are the steps. It understood that some people for what ever reason will prefer manually and may even have legitimate reasons to do so. When going this route, you will have to keep all the packages updated yourself.
29+
For those who want to install ScopeHunter without package control, here are the steps. It understood that some people
30+
for what ever reason will prefer manually and may even have legitimate reasons to do so. When going this route, you
31+
will have to keep all the packages updated yourself.
2532

2633
---
2734

28-
1. Download the latest releases of the following dependencies and unpack or git clone in the `Packages` folder as shown below:
35+
1. Download the latest releases of the following dependencies and unpack or git clone in the `Packages` folder as shown
36+
below:
2937

30-
- @bitbucket:teddy_beer_maniac/sublime-text-dependency-markupsafe -> `markupsafe`
31-
- @bitbucket:teddy_beer_maniac/sublime-text-dependency-jinja2 -> `python-jinja2`
32-
- @packagecontrol/pygments -> `pygments`
33-
- @facelessuser/sublime-markdown-popups -> `mdpopups`
34-
- @facelessuser/sublime-markdown -> `python-markdown`
38+
- @bitbucket:teddy_beer_maniac/sublime-text-dependency-markupsafe -> `markupsafe`
39+
- @bitbucket:teddy_beer_maniac/sublime-text-dependency-jinja2 -> `python-jinja2`
40+
- @packagecontrol/pygments -> `pygments`
41+
- @facelessuser/sublime-markdown-popups -> `mdpopups`
42+
- @facelessuser/sublime-markdown -> `python-markdown`
3543

36-
2. Download and unpack or git clone the latest ScopeHunter release and unpack as `ScopeHunter`:
44+
2. Download and unpack or git clone the latest ScopeHunter release and unpack as `ScopeHunter`:
3745

38-
- @facelessuser/ScopeHunter -> ScopeHunter
46+
- @facelessuser/ScopeHunter -> ScopeHunter
3947

40-
3. Create a folder under `Packages` called `00-dependencies` and under that folder create a file called `00-dependencies.py`:
48+
3. Create a folder under `Packages` called `00-dependencies` and under that folder create a file called
49+
`00-dependencies.py`:
4150

4251
Copy the following code to `00-dependencies.py` (this code was taken from Package Control):
4352

@@ -197,19 +206,20 @@ For those who want to install ScopeHunter without package control, here are the
197206
add_dependency('mdpopups')
198207
```
199208

200-
4. Restart and enjoy.
209+
4. Restart and enjoy.
201210

202211
## Git Cloning
203212

204-
1. Quit Sublime Text.
213+
1. Quit Sublime Text.
205214

206-
2. Open a terminal and enter the following. For dependencies replace the URL with the appropriate URL, and the appropriate folder to check it out to:
215+
2. Open a terminal and enter the following. For dependencies replace the URL with the appropriate URL, and the
216+
appropriate folder to check it out to:
207217

208218
```
209219
cd /path/to/Sublime Text 3/Packages
210220
git clone https://github.com/facelessuser/ScopeHunter.git RegReplace
211221
```
212222

213-
3. Restart Sublime Text.
223+
3. Restart Sublime Text.
214224

215225
--8<-- "refs.txt"

lib/file_strip/json.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# noqa: A005
12
"""
23
File Strip.
34

0 commit comments

Comments
 (0)