mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-07 13:44:55 +03:00
Replace any() with set operation.
This commit is contained in:
parent
13a6324673
commit
3dd7fc5e0f
|
@ -2080,7 +2080,7 @@ class Language:
|
|||
*disable,
|
||||
}
|
||||
# If any pipe to be enabled is in to_disable, the specification is inconsistent.
|
||||
if any([pipe_to_enable in to_disable for pipe_to_enable in enable]):
|
||||
if len(set(enable) & to_disable):
|
||||
raise ValueError(Errors.E1042.format(enable=enable, disable=disable))
|
||||
|
||||
return tuple(to_disable)
|
||||
|
|
Loading…
Reference in New Issue
Block a user