mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	Auto-format code with black (#8895)
Co-authored-by: explosion-bot <explosion-bot@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									1dfffe5fb4
								
							
						
					
					
						commit
						56d4d87aeb
					
				| 
						 | 
				
			
			@ -45,7 +45,9 @@ def project_pull(project_dir: Path, remote: str, *, verbose: bool = False):
 | 
			
		|||
                cmd_hash = get_command_hash("", "", deps, cmd["script"])
 | 
			
		||||
                for output_path in cmd.get("outputs", []):
 | 
			
		||||
                    url = storage.pull(output_path, command_hash=cmd_hash)
 | 
			
		||||
                    logger.debug(f"URL: {url} for {output_path} with command hash {cmd_hash}")
 | 
			
		||||
                    logger.debug(
 | 
			
		||||
                        f"URL: {url} for {output_path} with command hash {cmd_hash}"
 | 
			
		||||
                    )
 | 
			
		||||
                    yield url, output_path
 | 
			
		||||
 | 
			
		||||
                out_locs = [project_dir / out for out in cmd.get("outputs", [])]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -54,7 +54,9 @@ def project_push(project_dir: Path, remote: str):
 | 
			
		|||
                    command_hash=cmd_hash,
 | 
			
		||||
                    content_hash=get_content_hash(output_loc),
 | 
			
		||||
                )
 | 
			
		||||
                logger.debug(f"URL: {url} for output {output_path} with cmd_hash {cmd_hash}")
 | 
			
		||||
                logger.debug(
 | 
			
		||||
                    f"URL: {url} for output {output_path} with cmd_hash {cmd_hash}"
 | 
			
		||||
                )
 | 
			
		||||
                yield output_path, url
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -123,7 +123,10 @@ def test_ngram_suggester(en_tokenizer):
 | 
			
		|||
            assert spans.shape[0] == len(spans_set)
 | 
			
		||||
            offset += ngrams.lengths[i]
 | 
			
		||||
        # the number of spans is correct
 | 
			
		||||
        assert_array_equal(OPS.to_numpy(ngrams.lengths), [max(0, len(doc) - (size - 1)) for doc in docs])
 | 
			
		||||
        assert_array_equal(
 | 
			
		||||
            OPS.to_numpy(ngrams.lengths),
 | 
			
		||||
            [max(0, len(doc) - (size - 1)) for doc in docs],
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    # test 1-3-gram suggestions
 | 
			
		||||
    ngram_suggester = registry.misc.get("spacy.ngram_suggester.v1")(sizes=[1, 2, 3])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user