Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
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

Integrating the Fallback Libraries to SCTK. #3476

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
ref: added logic to fallback to ahocode
- made changes in match_unknown.py and match_aho.py to fallback to ahocode.

Signed-off-by: 35C4n0r <jaykumar20march@gmail.com>
  • Loading branch information
35C4n0r committed Jul 31, 2023
commit 13f3d439cb60e35e3600f0443db7199c70c944b8
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ python_requires = >=3.7
install_requires =
attrs >= 18.1,!=20.1.0;python_version<'3.11'
attrs >= 22.1.0;python_version>='3.11'
ahocode
Beautifulsoup4 >= 4.0.0
boolean.py >= 4.0
chardet >= 3.0.0
Expand Down
5 changes: 4 additions & 1 deletion src/licensedcode/match_aho.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

from itertools import groupby

import ahocorasick
try:
import ahocorasick
except ImportError:
import ahocode

from licensedcode import SMALL_RULE
from licensedcode.match import LicenseMatch
Expand Down
5 changes: 4 additions & 1 deletion src/licensedcode/match_unknown.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
# See https://aboutcode.org for more information about nexB OSS projects.
#

import ahocorasick
try:
import ahocorasick
except ImportError:
import ahocode

from licensedcode import tokenize
from licensedcode.models import UnknownRule
Expand Down