 (flycheck-define-checker python-flake8
   "A Python syntax and style checker using Flake8.
 
-Requires Flake8 2.0 or newer. See URL
+Requires Flake8 3.0 or newer. See URL
 `https://flake8.readthedocs.io/'."
   :command ("flake8"
             "--format=default"
+            "--stdin-display-name" source-original
             (config-file "--config" flycheck-flake8rc)
             (option "--max-complexity" flycheck-flake8-maximum-complexity nil
                     flycheck-option-int)

                   ((string= flycheck-rust-crate-type "lib") "--lib")
                   (flycheck-rust-binary-name
                    (list "--bin" flycheck-rust-binary-name))))
            "--" "-Z" "no-trans"
            ;; Passing the "unstable-options" flag may raise an error in the
            ;; future.  For the moment, we need it to access JSON output in all

       (= (or (get checker 'flycheck-generic-checker-version) 0)
          flycheck-generic-checker-version)))

(defun flycheck-checker-supports-major-mode-p (checker mode)
  "Whether CHECKER supports the given major MODE.

CHECKER is a syntax checker symbol and MODE a major mode symbol.
Look at the `modes' property of CHECKER to determine whether
CHECKER supports buffers in the given major MODE.

Return non-nil if CHECKER supports MODE and nil otherwise."
  (memq mode (flycheck-checker-get checker 'modes)))

(defun flycheck-may-use-checker (checker)
  "Whether a generic CHECKER may be used.

Return non-nil if CHECKER may be used for the current buffer, and
nil otherwise."
  (let ((predicate (flycheck-checker-get checker 'predicate)))
    (and (flycheck-valid-checker-p checker)
         (not (flycheck-disabled-checker-p checker))
         (flycheck-checker-supports-major-mode-p checker major-mode)
         (funcall predicate))))

(defun flycheck-may-use-next-checker (next-checker)
