mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	update mypy to latest version (#11546)
* update mypy and disable it for python 3.6 * ignoring mypy's type redefinition error
This commit is contained in:
		
							parent
							
								
									ba63f57f81
								
							
						
					
					
						commit
						bcda8bc1e7
					
				
							
								
								
									
										2
									
								
								.github/azure-steps.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/azure-steps.yml
									
									
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -27,7 +27,7 @@ steps:
 | 
			
		|||
 | 
			
		||||
  - script: python -m mypy spacy
 | 
			
		||||
    displayName: 'Run mypy'
 | 
			
		||||
    condition: ne(variables['python_version'], '3.10')
 | 
			
		||||
    condition: ne(variables['python_version'], '3.6')
 | 
			
		||||
 | 
			
		||||
  - task: DeleteFiles@1
 | 
			
		||||
    inputs:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,7 +30,7 @@ pytest-timeout>=1.3.0,<2.0.0
 | 
			
		|||
mock>=2.0.0,<3.0.0
 | 
			
		||||
flake8>=3.8.0,<3.10.0
 | 
			
		||||
hypothesis>=3.27.0,<7.0.0
 | 
			
		||||
mypy>=0.910,<0.970; platform_machine!='aarch64'
 | 
			
		||||
mypy>=0.980,<0.990; platform_machine != "aarch64" and python_version >= "3.7"
 | 
			
		||||
types-dataclasses>=0.1.3; python_version < "3.7"
 | 
			
		||||
types-mock>=0.1.1
 | 
			
		||||
types-setuptools>=57.0.0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,5 @@
 | 
			
		|||
import warnings
 | 
			
		||||
from typing import Optional, Union, List, Dict, Tuple, Iterable, Any, Callable, Sequence
 | 
			
		||||
from typing import cast
 | 
			
		||||
import warnings
 | 
			
		||||
from collections import defaultdict
 | 
			
		||||
from pathlib import Path
 | 
			
		||||
import srsly
 | 
			
		||||
| 
						 | 
				
			
			@ -317,7 +316,7 @@ class EntityRuler(Pipe):
 | 
			
		|||
                    phrase_pattern["id"] = ent_id
 | 
			
		||||
                phrase_patterns.append(phrase_pattern)
 | 
			
		||||
            for entry in token_patterns + phrase_patterns:  # type: ignore[operator]
 | 
			
		||||
                label = entry["label"]
 | 
			
		||||
                label = entry["label"]  # type: ignore
 | 
			
		||||
                if "id" in entry:
 | 
			
		||||
                    ent_label = label
 | 
			
		||||
                    label = self._create_label(label, entry["id"])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user