From 86e5679d423f7dac820dd28d38263043e882edc4 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Wed, 6 Oct 2021 20:19:55 +0200 Subject: [PATCH] MNT Remove encoding declarations: # -*- coding: utf-8 -*- In Python 3, the default source file encoding is UTF-8. --- doc/conf.py | 2 -- doc/sphinxext/sphinx_issues.py | 1 - sklearn/cluster/_dbscan.py | 1 - sklearn/cluster/_optics.py | 1 - sklearn/cluster/_spectral.py | 1 - sklearn/feature_extraction/tests/test_text.py | 1 - sklearn/feature_extraction/text.py | 1 - sklearn/feature_selection/_base.py | 1 - sklearn/gaussian_process/__init__.py | 2 -- sklearn/linear_model/_ransac.py | 2 -- sklearn/linear_model/_theil_sen.py | 1 - sklearn/metrics/pairwise.py | 2 -- sklearn/naive_bayes.py | 2 -- sklearn/neighbors/_nca.py | 1 - sklearn/neighbors/_nearest_centroid.py | 1 - sklearn/neighbors/tests/test_nca.py | 1 - sklearn/preprocessing/_discretization.py | 2 -- sklearn/preprocessing/tests/test_encoders.py | 2 -- sklearn/random_projection.py | 1 - 19 files changed, 26 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 659a5d70fa32b..266e76a40a824 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # scikit-learn documentation build configuration file, created by # sphinx-quickstart on Fri Jan 8 09:13:42 2010. # diff --git a/doc/sphinxext/sphinx_issues.py b/doc/sphinxext/sphinx_issues.py index 29eef175919d4..aa33a6f38e762 100644 --- a/doc/sphinxext/sphinx_issues.py +++ b/doc/sphinxext/sphinx_issues.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """A Sphinx extension for linking to your project's issue tracker. Copyright 2014 Steven Loria diff --git a/sklearn/cluster/_dbscan.py b/sklearn/cluster/_dbscan.py index 9826af09ec372..ed6495507307e 100644 --- a/sklearn/cluster/_dbscan.py +++ b/sklearn/cluster/_dbscan.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ DBSCAN: Density-Based Spatial Clustering of Applications with Noise """ diff --git a/sklearn/cluster/_optics.py b/sklearn/cluster/_optics.py index 45a080839c6ae..7f002a54f7af1 100755 --- a/sklearn/cluster/_optics.py +++ b/sklearn/cluster/_optics.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Ordering Points To Identify the Clustering Structure (OPTICS) These routines execute the OPTICS algorithm, and implement various diff --git a/sklearn/cluster/_spectral.py b/sklearn/cluster/_spectral.py index 8b80f9999b403..67618173d7c78 100644 --- a/sklearn/cluster/_spectral.py +++ b/sklearn/cluster/_spectral.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Algorithms for spectral clustering""" # Author: Gael Varoquaux gael.varoquaux@normalesup.org diff --git a/sklearn/feature_extraction/tests/test_text.py b/sklearn/feature_extraction/tests/test_text.py index 1de2dfa5b8121..af21a31612f6c 100644 --- a/sklearn/feature_extraction/tests/test_text.py +++ b/sklearn/feature_extraction/tests/test_text.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from collections.abc import Mapping import re diff --git a/sklearn/feature_extraction/text.py b/sklearn/feature_extraction/text.py index 8dd743813fa27..96e2da099986c 100644 --- a/sklearn/feature_extraction/text.py +++ b/sklearn/feature_extraction/text.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Authors: Olivier Grisel # Mathieu Blondel # Lars Buitinck diff --git a/sklearn/feature_selection/_base.py b/sklearn/feature_selection/_base.py index 6cdab9305f067..9d4cde2ba43a7 100644 --- a/sklearn/feature_selection/_base.py +++ b/sklearn/feature_selection/_base.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """Generic feature selection mixin""" # Authors: G. Varoquaux, A. Gramfort, L. Buitinck, J. Nothman diff --git a/sklearn/gaussian_process/__init__.py b/sklearn/gaussian_process/__init__.py index b22f0f10757a8..719208b7951be 100644 --- a/sklearn/gaussian_process/__init__.py +++ b/sklearn/gaussian_process/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - # Author: Jan Hendrik Metzen # Vincent Dubourg # (mostly translation, see implementation details) diff --git a/sklearn/linear_model/_ransac.py b/sklearn/linear_model/_ransac.py index c565c8c6ce403..3eeb086c1844f 100644 --- a/sklearn/linear_model/_ransac.py +++ b/sklearn/linear_model/_ransac.py @@ -1,5 +1,3 @@ -# coding: utf-8 - # Author: Johannes Schönberger # # License: BSD 3 clause diff --git a/sklearn/linear_model/_theil_sen.py b/sklearn/linear_model/_theil_sen.py index 579f0afa3997c..b858f97669154 100644 --- a/sklearn/linear_model/_theil_sen.py +++ b/sklearn/linear_model/_theil_sen.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ A Theil-Sen Estimator for Multiple Linear Regression Model """ diff --git a/sklearn/metrics/pairwise.py b/sklearn/metrics/pairwise.py index d493ad68603ea..76ef10fa289ad 100644 --- a/sklearn/metrics/pairwise.py +++ b/sklearn/metrics/pairwise.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - # Authors: Alexandre Gramfort # Mathieu Blondel # Robert Layton diff --git a/sklearn/naive_bayes.py b/sklearn/naive_bayes.py index 52d552a181dac..5f14526f3531d 100644 --- a/sklearn/naive_bayes.py +++ b/sklearn/naive_bayes.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - """ The :mod:`sklearn.naive_bayes` module implements Naive Bayes algorithms. These are supervised learning methods based on applying Bayes' theorem with strong diff --git a/sklearn/neighbors/_nca.py b/sklearn/neighbors/_nca.py index db1d8246e87df..4d36d866bfb8c 100644 --- a/sklearn/neighbors/_nca.py +++ b/sklearn/neighbors/_nca.py @@ -1,4 +1,3 @@ -# coding: utf-8 """ Neighborhood Component Analysis """ diff --git a/sklearn/neighbors/_nearest_centroid.py b/sklearn/neighbors/_nearest_centroid.py index b366b8a4871c3..cb98ff1480604 100644 --- a/sklearn/neighbors/_nearest_centroid.py +++ b/sklearn/neighbors/_nearest_centroid.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Nearest Centroid Classification """ diff --git a/sklearn/neighbors/tests/test_nca.py b/sklearn/neighbors/tests/test_nca.py index f9d7e5503a2c8..77f8bf728d1a1 100644 --- a/sklearn/neighbors/tests/test_nca.py +++ b/sklearn/neighbors/tests/test_nca.py @@ -1,4 +1,3 @@ -# coding: utf-8 """ Testing for Neighborhood Component Analysis module (sklearn.neighbors.nca) """ diff --git a/sklearn/preprocessing/_discretization.py b/sklearn/preprocessing/_discretization.py index 79a667911d354..1b595ad0b9643 100644 --- a/sklearn/preprocessing/_discretization.py +++ b/sklearn/preprocessing/_discretization.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - # Author: Henry Lin # Tom Dupré la Tour diff --git a/sklearn/preprocessing/tests/test_encoders.py b/sklearn/preprocessing/tests/test_encoders.py index 0429dc00c2322..9009d29a8e9f2 100644 --- a/sklearn/preprocessing/tests/test_encoders.py +++ b/sklearn/preprocessing/tests/test_encoders.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - import re import numpy as np diff --git a/sklearn/random_projection.py b/sklearn/random_projection.py index 6faab498eddb7..3765fa3d9ae99 100644 --- a/sklearn/random_projection.py +++ b/sklearn/random_projection.py @@ -1,4 +1,3 @@ -# -*- coding: utf8 """Random Projection transformers. Random Projections are a simple and computationally efficient way to