From 774e6b7e471651082d0260b691cc7da6dedcebea Mon Sep 17 00:00:00 2001 From: Peter Cottle Date: Fri, 17 May 2019 11:31:30 -0700 Subject: [PATCH 1/2] Change license to MIT --- LICENSE | 43 ++++++++++--------------- PATENTS | 33 ------------------- README.md | 2 +- assets/launch_page.css | 11 +++---- debian/package.sh | 5 ++- fpp | 9 ++---- fpp.rb | 5 ++- index.html | 12 +++---- scripts/buildAndTest.sh | 5 ++- scripts/makeDist.sh | 5 ++- scripts/makeManpage.sh | 5 ++- src/__tests__/cursesForTest.py | 8 ++--- src/__tests__/keyBindingsForTest.py | 10 ++---- src/__tests__/localTestCases.py | 9 ++---- src/__tests__/screenForTest.py | 11 +++---- src/__tests__/screenTestRunner.py | 23 ++++++------- src/__tests__/testKeyBindingsParsing.py | 23 ++++++------- src/__tests__/testParsing.py | 17 ++++------ src/__tests__/testScreen.py | 15 ++++----- src/charCodeMapping.py | 10 +++--- src/choose.py | 9 ++---- src/colorPrinter.py | 9 ++---- src/cursesAPI.py | 9 ++---- src/format.py | 9 ++---- src/formattedText.py | 8 ++--- src/keyBindings.py | 11 +++---- src/logger.py | 9 ++---- src/output.py | 9 ++---- src/parse.py | 9 ++---- src/printHelp.py | 9 ++---- src/processInput.py | 9 ++---- src/repos.py | 9 ++---- src/screenControl.py | 9 ++---- src/screenFlags.py | 9 ++---- src/stateFiles.py | 9 ++---- src/usageStrings.py | 9 ++---- src/version.py | 9 ++---- 37 files changed, 149 insertions(+), 266 deletions(-) delete mode 100644 PATENTS diff --git a/LICENSE b/LICENSE index fa2f2c52..87cbf536 100644 --- a/LICENSE +++ b/LICENSE @@ -1,30 +1,21 @@ -BSD License +MIT License -For PathPicker software +Copyright (c) Facebook, Inc. and its affiliates. -Copyright (c) 2015-present, Facebook, Inc. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name Facebook nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/PATENTS b/PATENTS deleted file mode 100644 index 4e4c61f5..00000000 --- a/PATENTS +++ /dev/null @@ -1,33 +0,0 @@ -Additional Grant of Patent Rights Version 2 - -"Software" means the PathPicker software distributed by Facebook, Inc. - -Facebook, Inc. ("Facebook") hereby grants to each recipient of the Software -("you") a perpetual, worldwide, royalty-free, non-exclusive, irrevocable -(subject to the termination provision below) license under any Necessary -Claims, to make, have made, use, sell, offer to sell, import, and otherwise -transfer the Software. For avoidance of doubt, no license is granted under -Facebook’s rights in any patent claims that are infringed by (i) modifications -to the Software made by you or any third party or (ii) the Software in -combination with any software or other technology. - -The license granted hereunder will terminate, automatically and without notice, -if you (or any of your subsidiaries, corporate affiliates or agents) initiate -directly or indirectly, or take a direct financial interest in, any Patent -Assertion: (i) against Facebook or any of its subsidiaries or corporate -affiliates, (ii) against any party if such Patent Assertion arises in whole or -in part from any software, technology, product or service of Facebook or any of -its subsidiaries or corporate affiliates, or (iii) against any party relating -to the Software. Notwithstanding the foregoing, if Facebook or any of its -subsidiaries or corporate affiliates files a lawsuit alleging patent -infringement against you in the first instance, and you respond by filing a -patent infringement counterclaim in that lawsuit against that party that is -unrelated to the Software, the license granted hereunder will not terminate -under section (i) of this paragraph due to such counterclaim. - -A "Necessary Claim" is a claim of a patent owned by Facebook that is -necessarily infringed by the Software standing alone. - -A "Patent Assertion" is any lawsuit or other action alleging direct, indirect, -or contributory infringement or inducement to infringe any patent, including a -cross-claim or counterclaim. diff --git a/README.md b/README.md index 1f9a46a6..641cacb6 100644 --- a/README.md +++ b/README.md @@ -127,4 +127,4 @@ For all documentation and configuration options, see the output of `fpp --help`. See the CONTRIBUTING file for how to help out. ## License -PathPicker is BSD-licensed. We also provide an additional patent grant. +PathPicker is MIT licensed. diff --git a/assets/launch_page.css b/assets/launch_page.css index bbc65a61..3798e302 100644 --- a/assets/launch_page.css +++ b/assets/launch_page.css @@ -1,11 +1,8 @@ /** - * Copyright (c) 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ +Copyright (c) Facebook, Inc. and its affiliates. +This source code is licensed under the MIT license found in the +LICENSE file in the root directory of this source tree. +**/ html { background-color:#fff; diff --git a/debian/package.sh b/debian/package.sh index 7247f9ea..231fe0cc 100755 --- a/debian/package.sh +++ b/debian/package.sh @@ -1,5 +1,8 @@ #!/bin/bash -# Copyright (c) 2015-present, Facebook, Inc. +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. PTH="$(pwd)" VERSION="$(python "$PTH/../src/version.py")" DATETIME=$(date '+%a, %d %b %Y %H:%M:%S %z') diff --git a/fpp b/fpp index 392495ea..7fa31c42 100755 --- a/fpp +++ b/fpp @@ -1,12 +1,9 @@ #!/bin/bash -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. +# Copyright (c) Facebook, Inc. and its affiliates. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # - # get the directory of this script so we can execute the related python # http://stackoverflow.com/a/246128/212110 SOURCE=$0 diff --git a/fpp.rb b/fpp.rb index d1eb5702..03800e7c 100644 --- a/fpp.rb +++ b/fpp.rb @@ -1,4 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. class Fpp < Formula desc "CLI program that accepts piped input and presents files for selection" homepage "https://facebook.github.io/PathPicker/" diff --git a/index.html b/index.html index 874e2dae..c25d95ed 100644 --- a/index.html +++ b/index.html @@ -1,13 +1,9 @@ diff --git a/scripts/buildAndTest.sh b/scripts/buildAndTest.sh index fe724be4..69a08f70 100755 --- a/scripts/buildAndTest.sh +++ b/scripts/buildAndTest.sh @@ -1,5 +1,8 @@ #!/bin/bash -# Copyright (c) 2015-present, Facebook, Inc. +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. if ! type autopep8 > /dev/null; then echo "'autopep8' required for build." diff --git a/scripts/makeDist.sh b/scripts/makeDist.sh index d651a9f4..d3cca110 100755 --- a/scripts/makeDist.sh +++ b/scripts/makeDist.sh @@ -1,5 +1,8 @@ #!/bin/bash -# Copyright (c) 2015-present, Facebook, Inc. +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. VERSION="$(python ./src/version.py)" DEST="./dist/fpp.$VERSION.tar.gz" mkdir -p ./dist/ diff --git a/scripts/makeManpage.sh b/scripts/makeManpage.sh index 2c927644..4d820db2 100755 --- a/scripts/makeManpage.sh +++ b/scripts/makeManpage.sh @@ -1,5 +1,8 @@ #!/bin/bash -# Copyright (c) 2015-present, Facebook, Inc. +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. command -v a2x >/dev/null 2>&1 || { echo >&2 "I require a2x provided by asciidoc, but it's not installed. Aborting."; exit 1; } python src/usageStrings.py > manpage.adoc; a2x --doctype manpage --format manpage manpage.adoc --destination-dir ./debian/usr/share/man/man1/; diff --git a/src/__tests__/cursesForTest.py b/src/__tests__/cursesForTest.py index 74e3dc5e..4644e58b 100644 --- a/src/__tests__/cursesForTest.py +++ b/src/__tests__/cursesForTest.py @@ -1,9 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. +# Copyright (c) Facebook, Inc. and its affiliates. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # from __future__ import print_function diff --git a/src/__tests__/keyBindingsForTest.py b/src/__tests__/keyBindingsForTest.py index de9d23e4..05ed9992 100644 --- a/src/__tests__/keyBindingsForTest.py +++ b/src/__tests__/keyBindingsForTest.py @@ -1,11 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. +# Copyright (c) Facebook, Inc. and its affiliates. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. -# - +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. KEY_BINDINGS_FOR_TEST_CONFIG_CONTENT = "[bindings]\nr = rspec\ns = subl\n" diff --git a/src/__tests__/localTestCases.py b/src/__tests__/localTestCases.py index 9aa1a32d..5688c1dd 100644 --- a/src/__tests__/localTestCases.py +++ b/src/__tests__/localTestCases.py @@ -1,11 +1,8 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. +# Copyright (c) Facebook, Inc. and its affiliates. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # - # If you have specific test cases local to your dev environment, # add them here LOCAL_TEST_CASES = [] diff --git a/src/__tests__/screenForTest.py b/src/__tests__/screenForTest.py index 0fdf34d2..a9762353 100644 --- a/src/__tests__/screenForTest.py +++ b/src/__tests__/screenForTest.py @@ -1,15 +1,12 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import print_function +from charCodeMapping import CHAR_TO_CODE import sys sys.path.insert(0, '../') -from charCodeMapping import CHAR_TO_CODE ATTRIBUTE_SYMBOL_MAPPING = { 0: ' ', diff --git a/src/__tests__/screenTestRunner.py b/src/__tests__/screenTestRunner.py index 64c0a882..d26fc364 100644 --- a/src/__tests__/screenTestRunner.py +++ b/src/__tests__/screenTestRunner.py @@ -1,26 +1,21 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import print_function +from keyBindingsForTest import KeyBindingsForTest +from cursesForTest import CursesForTest +from screenForTest import ScreenForTest +from screenFlags import ScreenFlags +import processInput +import choose import curses import sys import os sys.path.insert(0, '../') -import choose -import processInput - -from screenFlags import ScreenFlags - -from screenForTest import ScreenForTest -from cursesForTest import CursesForTest -from keyBindingsForTest import KeyBindingsForTest INPUT_DIR = './inputs/' diff --git a/src/__tests__/testKeyBindingsParsing.py b/src/__tests__/testKeyBindingsParsing.py index 1f9e556c..2774dafa 100644 --- a/src/__tests__/testKeyBindingsParsing.py +++ b/src/__tests__/testKeyBindingsParsing.py @@ -1,22 +1,17 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. +from keyBindingsForTest import KEY_BINDINGS_FOR_TEST_CONFIG_CONTENT +from keyBindingsForTest import KeyBindingsForTest +from keyBindings import KeyBindings +import tempfile +import keyBindings +import unittest import sys sys.path.insert(0, '../') -import unittest -import keyBindings -import tempfile - -from keyBindings import KeyBindings -from keyBindingsForTest import KeyBindingsForTest -from keyBindingsForTest import KEY_BINDINGS_FOR_TEST_CONFIG_CONTENT - class TestKeyBindingsParser(unittest.TestCase): diff --git a/src/__tests__/testParsing.py b/src/__tests__/testParsing.py index 4aa1a3d6..95ae8cea 100644 --- a/src/__tests__/testParsing.py +++ b/src/__tests__/testParsing.py @@ -1,21 +1,18 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import print_function +import parse +from localTestCases import LOCAL_TEST_CASES +from formattedText import FormattedText +import format import sys import unittest import os sys.path.insert(0, '../') -import format -from formattedText import FormattedText -from localTestCases import LOCAL_TEST_CASES -import parse fileTestCases = [{ 'input': 'html/js/hotness.js', diff --git a/src/__tests__/testScreen.py b/src/__tests__/testScreen.py index 9841a134..e175f222 100755 --- a/src/__tests__/testScreen.py +++ b/src/__tests__/testScreen.py @@ -1,18 +1,15 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import print_function +import screenTestRunner +import os +import unittest import sys sys.path.insert(0, '../') -import unittest -import os -import screenTestRunner EXPECTED_DIR = './expected/' screenTestCases = [{ diff --git a/src/charCodeMapping.py b/src/charCodeMapping.py index 3c29d13e..34796e5b 100644 --- a/src/charCodeMapping.py +++ b/src/charCodeMapping.py @@ -1,10 +1,8 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + from __future__ import print_function import curses diff --git a/src/choose.py b/src/choose.py index bd59065a..a1f4d975 100755 --- a/src/choose.py +++ b/src/choose.py @@ -1,10 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import print_function import curses diff --git a/src/colorPrinter.py b/src/colorPrinter.py index dbf06c36..0a243e9a 100644 --- a/src/colorPrinter.py +++ b/src/colorPrinter.py @@ -1,10 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import print_function import output diff --git a/src/cursesAPI.py b/src/cursesAPI.py index b53aeff0..acfa7e61 100644 --- a/src/cursesAPI.py +++ b/src/cursesAPI.py @@ -1,10 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import print_function import curses diff --git a/src/format.py b/src/format.py index e3946862..8e4fd8a9 100644 --- a/src/format.py +++ b/src/format.py @@ -1,10 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import print_function import os diff --git a/src/formattedText.py b/src/formattedText.py index 92e3880e..9ee837a3 100644 --- a/src/formattedText.py +++ b/src/formattedText.py @@ -1,9 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. +# Copyright (c) Facebook, Inc. and its affiliates. # -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # import re import curses diff --git a/src/keyBindings.py b/src/keyBindings.py index e7674b55..03e52846 100644 --- a/src/keyBindings.py +++ b/src/keyBindings.py @@ -1,10 +1,8 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. +from stateFiles import FPP_DIR import os import sys @@ -15,7 +13,6 @@ import configparser parserModule = configparser -from stateFiles import FPP_DIR KEY_BINDINGS_FILE = os.path.join(FPP_DIR, '.fpp.keys') diff --git a/src/logger.py b/src/logger.py index a0398269..2c8e8ba6 100644 --- a/src/logger.py +++ b/src/logger.py @@ -1,10 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. import json import subprocess import os diff --git a/src/output.py b/src/output.py index eb10ca57..a21ffbb7 100644 --- a/src/output.py +++ b/src/output.py @@ -1,10 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. import os import pickle import re diff --git a/src/parse.py b/src/parse.py index 5ed3c977..5e3ee9a5 100644 --- a/src/parse.py +++ b/src/parse.py @@ -1,10 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import print_function import re import os diff --git a/src/printHelp.py b/src/printHelp.py index d57b4dc6..cf53062b 100644 --- a/src/printHelp.py +++ b/src/printHelp.py @@ -1,10 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. import processInput processInput.usage() diff --git a/src/processInput.py b/src/processInput.py index 1233b54f..1bb71145 100755 --- a/src/processInput.py +++ b/src/processInput.py @@ -1,10 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import print_function import sys diff --git a/src/repos.py b/src/repos.py index f272164e..631de052 100644 --- a/src/repos.py +++ b/src/repos.py @@ -1,10 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. # If you are using a code grep query service and want to resolve # certain global symbols to local directories, diff --git a/src/screenControl.py b/src/screenControl.py index e8f6382b..323909e8 100755 --- a/src/screenControl.py +++ b/src/screenControl.py @@ -1,10 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import print_function import curses import sys diff --git a/src/screenFlags.py b/src/screenFlags.py index fa3493b1..6ad85b3b 100644 --- a/src/screenFlags.py +++ b/src/screenFlags.py @@ -1,10 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import print_function import argparse diff --git a/src/stateFiles.py b/src/stateFiles.py index 827aeb58..312c4f0a 100644 --- a/src/stateFiles.py +++ b/src/stateFiles.py @@ -1,10 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import print_function import os diff --git a/src/usageStrings.py b/src/usageStrings.py index 6c4e6bf9..b2054a3b 100644 --- a/src/usageStrings.py +++ b/src/usageStrings.py @@ -1,10 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import print_function from screenFlags import ScreenFlags diff --git a/src/version.py b/src/version.py index 73d8e9f2..697b7b94 100755 --- a/src/version.py +++ b/src/version.py @@ -1,10 +1,7 @@ -# Copyright (c) 2015-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. An additional grant -# of patent rights can be found in the PATENTS file in the same directory. +# Copyright (c) Facebook, Inc. and its affiliates. # +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from __future__ import print_function From 3e4aee35fb12cb364e043bb06c1b0b3a881fa228 Mon Sep 17 00:00:00 2001 From: Peter Cottle Date: Fri, 17 May 2019 11:46:05 -0700 Subject: [PATCH 2/2] fix up imports --- src/__tests__/screenForTest.py | 2 +- src/__tests__/screenTestRunner.py | 12 ++++++------ src/__tests__/testKeyBindingsParsing.py | 7 ++++--- src/__tests__/testParsing.py | 8 ++++---- src/__tests__/testScreen.py | 4 ++-- src/keyBindings.py | 3 ++- 6 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/__tests__/screenForTest.py b/src/__tests__/screenForTest.py index a9762353..1b3cb50d 100644 --- a/src/__tests__/screenForTest.py +++ b/src/__tests__/screenForTest.py @@ -4,9 +4,9 @@ # LICENSE file in the root directory of this source tree. from __future__ import print_function -from charCodeMapping import CHAR_TO_CODE import sys sys.path.insert(0, '../') +from charCodeMapping import CHAR_TO_CODE ATTRIBUTE_SYMBOL_MAPPING = { 0: ' ', diff --git a/src/__tests__/screenTestRunner.py b/src/__tests__/screenTestRunner.py index d26fc364..9a55ebab 100644 --- a/src/__tests__/screenTestRunner.py +++ b/src/__tests__/screenTestRunner.py @@ -4,18 +4,18 @@ # LICENSE file in the root directory of this source tree. from __future__ import print_function -from keyBindingsForTest import KeyBindingsForTest -from cursesForTest import CursesForTest -from screenForTest import ScreenForTest -from screenFlags import ScreenFlags -import processInput -import choose import curses import sys import os sys.path.insert(0, '../') +from keyBindingsForTest import KeyBindingsForTest +from cursesForTest import CursesForTest +from screenForTest import ScreenForTest +from screenFlags import ScreenFlags +import processInput +import choose INPUT_DIR = './inputs/' diff --git a/src/__tests__/testKeyBindingsParsing.py b/src/__tests__/testKeyBindingsParsing.py index 2774dafa..4ac83c50 100644 --- a/src/__tests__/testKeyBindingsParsing.py +++ b/src/__tests__/testKeyBindingsParsing.py @@ -2,15 +2,16 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. +import sys + +sys.path.insert(0, '../') + from keyBindingsForTest import KEY_BINDINGS_FOR_TEST_CONFIG_CONTENT from keyBindingsForTest import KeyBindingsForTest from keyBindings import KeyBindings import tempfile import keyBindings import unittest -import sys - -sys.path.insert(0, '../') class TestKeyBindingsParser(unittest.TestCase): diff --git a/src/__tests__/testParsing.py b/src/__tests__/testParsing.py index 95ae8cea..1d6cd251 100644 --- a/src/__tests__/testParsing.py +++ b/src/__tests__/testParsing.py @@ -4,15 +4,15 @@ # LICENSE file in the root directory of this source tree. from __future__ import print_function -import parse -from localTestCases import LOCAL_TEST_CASES -from formattedText import FormattedText -import format import sys import unittest import os sys.path.insert(0, '../') +import parse +from localTestCases import LOCAL_TEST_CASES +from formattedText import FormattedText +import format fileTestCases = [{ 'input': 'html/js/hotness.js', diff --git a/src/__tests__/testScreen.py b/src/__tests__/testScreen.py index e175f222..a4b5ee3d 100755 --- a/src/__tests__/testScreen.py +++ b/src/__tests__/testScreen.py @@ -4,11 +4,11 @@ # LICENSE file in the root directory of this source tree. from __future__ import print_function +import sys +sys.path.insert(0, '../') import screenTestRunner import os import unittest -import sys -sys.path.insert(0, '../') EXPECTED_DIR = './expected/' diff --git a/src/keyBindings.py b/src/keyBindings.py index 03e52846..98e43087 100644 --- a/src/keyBindings.py +++ b/src/keyBindings.py @@ -2,7 +2,6 @@ # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -from stateFiles import FPP_DIR import os import sys @@ -14,6 +13,8 @@ parserModule = configparser +from stateFiles import FPP_DIR + KEY_BINDINGS_FILE = os.path.join(FPP_DIR, '.fpp.keys')